Export (0) Print
Expand All

BitmapImage::DecodePixelHeight Property

Gets or sets the height, in pixels, that the image is decoded to.

Namespace:  System.Windows.Media.Imaging
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public:
property int DecodePixelHeight {
	int get ();
	void set (int value);
}
<object DecodePixelHeight="int" .../>

Property Value

Type: System::Int32
The height, in pixels, that the image is decoded to. The default value is 0.

Identifier field

DecodePixelHeightProperty

Metadata properties set to true

None

If DecodePixelWidth is also set, the aspect ratio of the bitmap is ignored. If DecodePixelWidth is not set, the aspect ratio remains the same.

The JPEG and Portable Network Graphics (PNG) codecs natively decode the image to the specified size; other codecs decode the image at its original size and scale the image to the desired size.

The following code example demonstrates how to set the DecodePixelHeight property by using code.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft