# MatrixTransformMatrixTransformMatrixTransformMatrixTransform Class

## Definition

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

public ref class MatrixTransform sealed : System::Windows::Media::Transform
public sealed class MatrixTransform : System.Windows.Media.Transform
type MatrixTransform = class
inherit Transform
Public NotInheritable Class MatrixTransform
Inherits Transform
Inheritance

## Remarks

Use the MatrixTransform class to create custom transformations that are not provided by the RotateTransform, SkewTransform, ScaleTransform, or TranslateTransform classes.

A 3x3 matrix is used for transformations in a 2-D x-y plane. You can multiply affine matrix transformations to form linear transformations, such as rotation and skew (shear) that are followed by translation.

An affine matrix transformation has its final column equal to (0, 0, 1); therefore, you only have to specify the members in the first two columns.

A Windows Presentation Foundation (WPF) Matrix has the following structure:

M11 M12 0
M21 M22 0
OffsetX OffsetY 1

The members in the last row, OffsetX and OffsetY, represent translation values.

Methods and properties usually specify the transformation matrix as a vector that has only six members; the members are as follows:

(M11, M12, M21, M22, OffsetX, OffsetY)

### XAML Attribute Usage

<object property="m11, m12, m21, m22, offsetX, offsetY"/>
- or -
<object property="Identity"/>

### XAML Values

The value at position (1, 1) of the transformation Matrix.

The value at position (1, 2) of the transformation Matrix.

The value at position (2, 1) of the transformation Matrix.

The value at position (2, 2) of the transformation Matrix.

offsetX
System.Double

The value at position (3, 1) of the transformation Matrix.

offsetY
System.Double

The value at position (3, 2) of the transformation Matrix.

## Constructors

 MatrixTransform() MatrixTransform() MatrixTransform() MatrixTransform() Initializes a new instance of the MatrixTransform class. MatrixTransform(Double, Double, Double, Double, Double, Double) MatrixTransform(Double, Double, Double, Double, Double, Double) MatrixTransform(Double, Double, Double, Double, Double, Double) MatrixTransform(Double, Double, Double, Double, Double, Double) Initializes a new instance of the MatrixTransform class with the specified transformation matrix values. MatrixTransform(Matrix) MatrixTransform(Matrix) MatrixTransform(Matrix) MatrixTransform(Matrix) Initializes a new instance of the MatrixTransform class with the specified transformation matrix.

## Fields

 MatrixProperty MatrixProperty MatrixProperty MatrixProperty Identifies the Matrix dependency property.

## Properties

 CanFreeze CanFreeze CanFreeze CanFreeze Gets a value that indicates whether the object can be made unmodifiable. (Inherited from Freezable) DependencyObjectType DependencyObjectType DependencyObjectType DependencyObjectType Gets the DependencyObjectType that wraps the CLR type of this instance. (Inherited from DependencyObject) Dispatcher Dispatcher Dispatcher Dispatcher Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject) HasAnimatedProperties HasAnimatedProperties HasAnimatedProperties HasAnimatedProperties Gets a value that indicates whether one or more AnimationClock objects is associated with any of this object's dependency properties. (Inherited from Animatable) Inverse Inverse Inverse Inverse Gets the inverse of this transform, if it exists. (Inherited from Transform) IsFrozen IsFrozen IsFrozen IsFrozen Gets a value that indicates whether the object is currently modifiable. (Inherited from Freezable) IsSealed IsSealed IsSealed IsSealed Gets a value that indicates whether this instance is currently sealed (read-only). (Inherited from DependencyObject) Matrix Matrix Matrix Matrix Gets or sets the Matrix structure that defines this transformation. Value Value Value Value Gets the Matrix that represents this MatrixTransform.