MatrixTransform MatrixTransform MatrixTransform Class

Creates an arbitrary affine matrix transformation that is used to manipulate objects or coordinate systems in a two-dimensional plane.

Syntax

Declaration

public sealed class MatrixTransformpublic sealed class MatrixTransformPublic NotInheritable Class MatrixTransform
<MatrixTransform .../>

Inheritance Hierarchy

Inherited Members

Inherited methods

, , , , , , , , ,

Inherited properties

, ,

Windows.UI.Xaml.Media.GeneralTransform.TryTransform(Windows.Foundation.Point,Windows.Foundation.Point)
Windows.UI.Xaml.Media.GeneralTransform.TryTransform(Windows.Foundation.Point,Windows.Foundation.Point)
Windows.UI.Xaml.Media.GeneralTransform.TryTransform(Windows.Foundation.Point,Windows.Foundation.Point)
,
Windows.UI.Xaml.Media.GeneralTransform.TryTransformCore(Windows.Foundation.Point,Windows.Foundation.Point)
Windows.UI.Xaml.Media.GeneralTransform.TryTransformCore(Windows.Foundation.Point,Windows.Foundation.Point)
Windows.UI.Xaml.Media.GeneralTransform.TryTransformCore(Windows.Foundation.Point,Windows.Foundation.Point)

Remarks

Examples

This example transforms the position and skew of a rectangle using a MatrixTransform.

<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>

Constructors summary

Initializes a new instance of the MatrixTransform class.

Properties summary

Gets or sets the Matrix that defines this transformation.

Identifies the Matrix dependency property.

Constructors

  • MatrixTransform()
    MatrixTransform()
    MatrixTransform()
    MatrixTransform()

    Initializes a new instance of the MatrixTransform class.

    public MatrixTransform()public New()Public Sub New()public MatrixTransform()

Properties

  • Matrix
    Matrix
    Matrix
    Matrix

    Gets or sets the Matrix that defines this transformation.

    public Matrix Matrix { get; set; }public Matrix Matrix { get; set; }Public ReadWrite Property Matrix As Matrixpublic Matrix Matrix { get; set; }
    <MatrixTransform>
      <MatrixTransform.Matrix>
        singleMatrix
      </MatrixTransform.Matrix>
    </MatrixTransform>
    

    Property Value

    • The Matrix structure that defines this transformation. The default is an identity Matrix. An identity matrix has a value of 1 in coefficients [1,1], [2,2], and [3,3]; and a value of 0 in the rest of the coefficients.

  • MatrixProperty
    MatrixProperty
    MatrixProperty
    MatrixProperty

    Identifies the Matrix dependency property.

    public static DependencyProperty MatrixProperty { get; }public static DependencyProperty MatrixProperty { get; }Public Static ReadOnly Property MatrixProperty As DependencyPropertypublic static DependencyProperty MatrixProperty { get; }

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Media.dll