XRStretch (Compact 2013)
3/28/2014
This enumeration describes how content is resized to fill its allocated space.
Syntax
enum XRStretch{
XRStretch_None=0,
XRStretch_Fill=1,
XRStretch_Uniform=2,
XRStretch_UniformToFill=3,
};
Members
XRStretch_None
The content preserves its original size.The following illustration shows an image with the Stretch property set to XRStretch_None.
XRStretch_Fill
The content is resized to fill the destination dimensions. The aspect ratio is not preserved.The following illustration shows an image with the Stretch property set to XRStretch_Fill.
XRStretch_Uniform
The content is resized to fit in the destination dimensions while preserving its native aspect ratio.The following illustration shows an image with the Stretch property set to XRStretch_Uniform.
XRStretch_UniformToFill
The content is resized to fill the destination dimensions while preserving its native aspect ratio. If the aspect ratio of the destination rectangle differs from the source, the source content is clipped to fit in the destination dimensions.The following illustration shows an image with the Stretch property set to XRStretch_UniformToFill.
Remarks
In some cases you can get faster performance by setting Stretch properties to Fill instead of other values, including None. By using Fill, you eliminate potential clipping that can add extra edges. All types of stretch besides Fill need to compute layout. However, the difference in performance will probably be minimal unless you are rendering many images.
.NET Framework Equivalent
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |
See Also
Reference
XAML for Windows Embedded Enumerations
IXRShape::GetStretch
IXRShape::SetStretch
IXRTileBrush::GetStretch
IXRTileBrush::SetStretch
IXRImage::GetStretch
IXRImage::SetStretch