This documentation is archived and is not being maintained.

Matrix.M21 Property

Gets or sets the value of the second row and first column of this Matrix structure.

Namespace: System.Windows.Media
Assembly: WindowsBase (in windowsbase.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

'Declaration
Public Property M21 As Double
'Usage
Dim instance As Matrix
Dim value As Double

value = instance.M21

instance.M21 = value
/** @property */
public double get_M21 ()

/** @property */
public void set_M21 (double value)

public function get M21 () : double

public function set M21 (value : double)

<object M21="double" .../>

Property Value

The value of the second row and first column of this Matrix. The default value is 0.

The following table shows the layout of a Matrix.

M11

M12

0

M21

M22

0

OffsetX

OffsetY

1

The following example shows how to multiply two Matrix structures and how to assign values to a Matrix when it is declared, and after the structure is declared.

private void multiplicationExample()
{

    Matrix matrix1 = new Matrix(5, 10, 15, 20, 25, 30);
    Matrix matrix2 = new Matrix(2, 4, 6, 8, 10, 12);
    
    // matrixResult is equal to (70,100,150,220,240,352) 
    Matrix matrixResult = Matrix.Multiply(matrix1, matrix2);
    
    // matrixResult2 is also
    // equal to (70,100,150,220,240,352) 
    Matrix matrixResult2 = matrix1 * matrix2;
    

}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: