IXRTileBrush::SetStretch (Compact 2013)

3/28/2014

This method sets a value that specifies how the content of this tile brush stretches to fit its tiles.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetStretch(
    XRStretch Stretch
) = 0;

Parameters

  • Stretch
    [in] XRStretch enumerated type that indicates how the tile-brush content is projected onto its base tile.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The Stretch value can be set to one of the following values:

  • XRStretch_None: The tile-brush content does not stretch to fill the tile.
  • XRStretch_Uniform: The tile-brush content scales to fit the tile dimensions but preserves its original aspect ratio.
  • XRStretch_UniformToFill: The tile-brush content scales to completely fill the output area but preserves its original aspect ratio.
  • XRStretch_Fill: The tile-brush content scales to fit the tile. Because the content's height and width are scaled independently, the tile-brush content might be distorted in order to completely fill the output tile.

The following illustration shows the different XRStretch settings:

None

Uniform

UniformToFill

Fill

Ee503918.b25b2c91-1fea-4bc2-89e0-477a7426839b(en-us,WinEmbedded.80).jpg
Ee503918.3b77c288-6a12-4180-83a4-59d2f7d0cabc(en-us,WinEmbedded.80).jpg
Ee503918.5cbcca5b-3022-49a0-b226-5215b1068ced(en-us,WinEmbedded.80).jpg
Ee503918.6af348d1-f319-4c67-89d5-fd0f95ff1ffc(en-us,WinEmbedded.80).jpg

.NET Framework Equivalent

System.Windows.Media.TileBrush.Stretch

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRTileBrush
IXRTileBrush::GetStretch