Udostępnij za pośrednictwem


CompositionStretch Enum

Definition

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

public enum class CompositionStretch
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class CompositionStretch
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
enum class CompositionStretch
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum CompositionStretch
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
public enum CompositionStretch
Public Enum CompositionStretch
Inheritance
CompositionStretch
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Name Value Description
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.

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.

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 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.

Applies to