IXRScaleTransform::SetScaleX (Compact 2013)

3/28/2014

This method sets the factor by which to scale the UI object along the x-axis.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetScaleX(
    float ScaleX
) = 0;

Parameters

  • ScaleX
    [in] A float value that indicates the scale factor along the x-axis.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The default value is 1, which indicates no scaling along the x-axis. When ScaleX is between 0 and 1, it decreases the width of the scaled object. When ScaleX is greater than 1, it increases the width of the scaled object.

When ScaleX is a negative value, it flips the scaled object horizontally. When ScaleX is between 0 and -1, it flips the scaled object and decreases its width. When ScaleX is less than -1, it flips the object and increases its width. A value of -1 flips the scaled object but does not change its horizontal size.

You can offset the local origin point (0,0) for a UI element can be offset on an IXRCanvas container object by setting the attached properties Canvas.Left and Canvas.Top. However, this is not considered a transformation; the UI object keeps its own local origin point for transformation purposes.

.NET Framework Equivalent

System.Windows.Media.ScaleTransform.ScaleX

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRScaleTransform
IXRScaleTransform::GetScaleX