CompositionStretch CompositionStretch CompositionStretch CompositionStretch Enum

Definition

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

public : enum class CompositionStretch
enum class winrt::Windows::UI::Composition::CompositionStretch : int32_t
public enum CompositionStretch
Public Enum CompositionStretch
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 1

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 0

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 2

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 3

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.