CompositionStretch Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies how content is scaled when mapped from its source to a destination space.
public enum class CompositionStretch
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.LiftedContract, 65536)]
enum class CompositionStretch
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
enum class CompositionStretch
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.LiftedContract), 65536)]
public enum CompositionStretch
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
public enum CompositionStretch
var value = Microsoft.UI.Composition.CompositionStretch.none
Public Enum CompositionStretch
- Inheritance
-
CompositionStretch
- Attributes
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.