CompositionStretch CompositionStretch CompositionStretch CompositionStretch Enum

Definition

Specifies how content is scaled when mapped from its source to a destination space.

public : enum class CompositionStretchpublic enum CompositionStretchPublic Enum CompositionStretch// This API is not available in Javascript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Fields

Fill Fill Fill Fill

Scale content such that its size is equal to the size of the destination. The aspect ratio of the content is not preserved.

None None None None

No Scaling. If the size of the content is greater than size of destination, the content is clipped to the bounds of the destination space.

Uniform Uniform Uniform Uniform

Scale content such that its aspect ratio is preserved and it fits entirely within the bounds of the destination space. If the content’s aspect ratio does not match that of the destination, the content will not cover some of the area bound by the destination space. This is the default value for CompositionSurfaceBrush.Stretch.

UniformToFill UniformToFill UniformToFill UniformToFill

Scale content such that its aspect ratio is preserved and it fills the entirety of the destination’s bounds. If the content’s aspect ratio does not match that of the destination, the content will be clipped to the bounds of the destination.

Remarks

For stretching the contents of a CompositionSurfaceBrush onto a SpriteVisual, refer to the CompositionSurfaceBrush.Stretch property.