RenderOptions.GetBitmapScalingMode(DependencyObject) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Returnerar värdet för den BitmapScalingMode anslutna egenskapen för ett angivet beroendeobjekt.
public:
static System::Windows::Media::BitmapScalingMode GetBitmapScalingMode(System::Windows::DependencyObject ^ target);
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))]
public static System.Windows.Media.BitmapScalingMode GetBitmapScalingMode(System.Windows.DependencyObject target);
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))>]
static member GetBitmapScalingMode : System.Windows.DependencyObject -> System.Windows.Media.BitmapScalingMode
Public Shared Function GetBitmapScalingMode (target As DependencyObject) As BitmapScalingMode
Parametrar
- target
- DependencyObject
Beroendeobjektet som den anslutna egenskapens värde BitmapScalingMode ska hämtas från.
Returer
Det aktuella värdet för den BitmapScalingMode anslutna egenskapen för det angivna beroendeobjektet.
- Attribut
Undantag
Den angivna target är null.
Exempel
I följande exempel visas hur du hämtar BitmapScalingMode för ett bildobjekt.
// Get the bitmap scaling mode for the image.
BitmapScalingMode bitmapScalingMode = RenderOptions.GetBitmapScalingMode(MyImage);
' Get the bitmap scaling mode for the image.
Dim bitmapScalingMode As BitmapScalingMode = RenderOptions.GetBitmapScalingMode(MyImage)