RenderOptions.GetBitmapScalingMode(DependencyObject) 方法

定义

返回指定的依赖对象的 BitmapScalingMode 附加属性值。

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

参数

target
DependencyObject

要从中检索 BitmapScalingMode 附加属性值的依赖对象。

返回

BitmapScalingMode

BitmapScalingMode 附加属性的当前值(位于指定的依赖对象上)。

属性

例外

指定的 targetnull

示例

以下示例演示如何获取 BitmapScalingMode 图像对象的对象。

// 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)

适用于

另请参阅