Compartilhar via


IXRScaleTransform (Compact 2013)

3/28/2014

This class applies a size transformation to a UI object in the two-dimensional x,y coordinate system.

Syntax

class IXRScaleTransform : public IXRTransform

Inheritance Hierarchy

IXRDependencyObject

    IXRGeneralTransform

        IXRTransform

            IXRTransformGroup

Methods

Method

Description

IXRScaleTransform::GetCenterX

Retrieves the x-coordinate of the center point of this scale transformation.

IXRScaleTransform::GetCenterY

Retrieves the y-coordinate of the center point of this scale transformation.

IXRScaleTransform::GetScaleX

Retrieves the factor by which to scale the UI object along the x-axis.

IXRScaleTransform::GetScaleY

Retrieves the factor by which to scale the UI object along the y-axis.

IXRScaleTransform::SetCenterX

Sets the x-coordinate of the center point of this scale transformation.

IXRScaleTransform::SetCenterY

Sets the y-coordinate of the center point of this scale transformation.

IXRScaleTransform::SetScaleX

Sets the factor by which to scale the UI object along the x-axis.

IXRScaleTransform::SetScaleY

Sets the factor by which to scale the UI object along the y-axis.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

You can use an IXRScaleTransform object to stretch or shrink a UI element horizontally or vertically. The value that is passed in IXRScaleTransform::SetScaleX indicates the amount to stretch or shrink an object along the x-axis, and the value that is passed in IXRScaleTransform::SetScaleY indicates the amount to stretch or shrink an object along the y-axis. Scale operations are centered on the point that is specified by IXRScaleTransform::SetCenterX and IXRScaleTransform::SetCenterY.

You can offset the local origin point (0,0) for a UI element 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.

You can apply a group of multiple transformationsIXRScaleTransform to a UI object by using an IXRTransformGroup object. You can create custom transformations by using IXRMatrixTransform.

You can use IXRScaleTransform to alter how several objects are displayed on the screen, including IXRTextBlock, IXRRectangle, or IXRShape. To apply a scale transformation to a UI object, create an IXRScaleTransform instance and apply it to the object by passing it into the inherited method IXRUIElement::SetRenderTransform.

When you create a class instance, use an IXRScaleTransformPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can also define a scale transformation in Microsoft Silverlight 3 XAML. For information about the differences in Silverlight 3 implementations in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the ScaleTransform Class on MSDN.

.NET Framework Equivalent

System.Windows.Media.ScaleTransform

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Visual Appearance