This documentation is archived and is not being maintained.

Image.Stretch Property

Gets or sets a value that describes how an Image should be stretched to fill the destination rectangle. This is a dependency property.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:

property Stretch Stretch {
	Stretch get ();
	void set (Stretch value);
/** @property */
public Stretch get_Stretch ()

/** @property */
public void set_Stretch (Stretch value)

public function get Stretch () : Stretch

public function set Stretch (value : Stretch)

<object Stretch="Stretch" .../>

Property Value

One of the Stretch values. The default is Uniform.

Identifier field


Metadata properties set to true


The Fill property will cause your image to stretch to completely fill the output area. When the output area and the image have different aspect ratios, the image is distorted by this stretching. To make an Image preserve the aspect ratio of the image, set this property to Uniform (default) or UniformToFill.

The following example demonstrates how to use this property.

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0