Export (0) Print
Expand All
Key
M11
M12
M21
M22
Tag
Uri
X1
X2
Y1
Y2
Expand Minimize

Stretch (ImageBrush)

Silverlight

Gets or sets a value that specifies how the content of an ImageBrush should be stretched to the applied brush area.

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

Type: Stretch

One of the enumeration values that specifies how the content is rendered.

This property is read/write. The default value is Fill.

The Stretch property accepts the following values, which the Stretch enumeration defines:

  • None: The content does not stretch to fill the output dimensions, and the applied brush area will come from the matching sized area of the image. If the AlignmentX and AlignmentY properties are at their defaults, only the center area of the image will be applied to the brush.

  • Uniform: The content is scaled to fit the output dimensions. However, the aspect ratio of the content is preserved.

  • UniformToFill: The content is scaled so that it completely fills the output area, but it preserves its original aspect ratio.

  • Fill: The content is scaled to fit the output dimensions. Because the content's height and width are scaled independently, the original aspect ratio of the content might not be preserved. That is, the content might be distorted in order to completely fill the output area.

Community Additions

ADD
Show:
© 2014 Microsoft