[This documentation is preliminary and is subject to change.]
Gets or sets transform information that affects the rendering position of a UIElement.
Syntax
<uiElement> <uiElement.RenderTransform> singleTransform </uiElement.RenderTransform> </uiElement>
XAML Values
- singleTransform
-
Exactly one object element for an object that derives from Transform. This is typically one of the transforms: RotateTransform, ScaleTransform, SkewTransform, TranslateTransform, MatrixTransform, or TransformGroup. By using TransformGroup here, you can apply multiple transforms by defining child object elements of the TransformGroup. See the "XAML Values" section for TransformGroup. Also, custom transforms might derive from MatrixTransform.
Property value
Type: Transform
Describes the specifics of the desired render transform. The default value is null.
Examples
This XAML defines a Matrix that provides data for a MatrixTransform applied to a rectangular shape as its RenderTransform. In this case, the matrix combines an offset (OffsetX and OffsetY) and a skew (M12). Note that this same effect could have been produced by combining a TranslateTransform and a SkewTransform; whether to use a single Matrix or combinations of discrete transforms (with TransformGroup) is a matter of coding style; the results are identical.
<Rectangle Width="60" Height="60" Fill="Blue"> <Rectangle.RenderTransform> <MatrixTransform> <MatrixTransform.Matrix > <!-- This matrix transforms the x,y position of the rectangle and skews it. --> <Matrix OffsetX="30" OffsetY="100" M12="0.5" /> </MatrixTransform.Matrix> </MatrixTransform> </Rectangle.RenderTransform> </Rectangle>
Requirements
|
Minimum supported client | Windows 8 Release Preview |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 5/22/2012
