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 当前值。

属性

例外

指定的 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)

适用于

另请参阅