通过


BitmapSizeOptions.FromHeight(Int32) 方法

定义

初始化一个实例,该实例 BitmapSizeOptions 保留源位图的纵横比并指定初始 PixelHeight

public:
 static System::Windows::Media::Imaging::BitmapSizeOptions ^ FromHeight(int pixelHeight);
public static System.Windows.Media.Imaging.BitmapSizeOptions FromHeight(int pixelHeight);
static member FromHeight : int -> System.Windows.Media.Imaging.BitmapSizeOptions
Public Shared Function FromHeight (pixelHeight As Integer) As BitmapSizeOptions

参数

pixelHeight
Int32

生成的位图的高度(以像素为单位)。

返回

BitmapSizeOptions的实例。

例外

当小于零时 pixelHeight 发生。

注解

返回的属性将设置为Rotate0,其PreservesAspectRatiotrue设置为,其设置为值pixelHeight,并将其PixelWidthPixelHeight设置为零。RotationBitmapSizeOptions

适用于