共用方式為


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)

適用於

另請參閱