RenderOptions.GetBitmapScalingMode(DependencyObject) Metod

Definition

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)

Gäller för

Se även