BitmapSizeOptions.FromHeight Method (Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes an instance of BitmapSizeOptions that preserves the aspect ratio of the source bitmap and specifies an initial PixelHeight.

Namespace:   System.Windows.Media.Imaging
Assembly:  PresentationCore (in PresentationCore.dll)

public static BitmapSizeOptions FromHeight(
	int pixelHeight
)

Parameters

pixelHeight
Type: System.Int32

The height, in pixels, of the resulting bitmap.

Exception Condition
ArgumentOutOfRangeException

Occurs when pixelHeight is less than zero.

The returned BitmapSizeOptions will have its Rotation property set to Rotate0, its PreservesAspectRatio set to true, its PixelHeight set to the value of pixelHeight, and its PixelWidth set to zero.

.NET Framework
Available since 3.0
Return to top
Show: