MatrixTransform in XAML Silverlight


Introduction

In Silverlight ‘MatrixTransform’ creates an arbitrary affine matrix transformation that is used to manipulate objects or coordinate systems in a two-dimensional plane. Matrix Transformation is subject of Mathematical calculation and it’s not really complication as looks. Well, look at some properties of MatrixTransform that are important to know, consider the screenshot too:


Attributes of MatrixTransformation

M11 (Default value 1)

This is the value at position (1, 1) as in Mathematics, confused let me explain. M11 is just a point at position (1, 1). If element (here Grid) has width as 250 (look in screenshot below) will be considered as 1. If we doubled the value of M11 from 1 to 2 then transformed size will be about [250x2] 500.


M12 (Default value 0)

This is the value at position (1, 2) as in Mathematics. Look at screenshot for more explanation.


M21 (Default value 0)

This is the value at position (2, 1) as in Mathematics. Look at screenshot for more explanation.


M22 (Default value 1)

This is the value at position (2, 2) as in Mathematics. M22 is just a point at position (2, 2). If element (here Grid) has height as 50 (look in screenshot below) will be considered as 1. If we doubled the value of M22 from 1 to 2 then transformed size will be about [50x2] 100.


OffsetX (Default value 0)

This is the value at position (3, 1), in coordinate system it affects the art little, check yourself by changing its value.

OffsetY (Default value 0)

This is the value at position (3, 2), in coordinate system it affects the art little, check yourself by changing its value.


In above screenshot, I have changed value of every property and the same I get the above output.

Comments

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System

Lambda two tables and three tables inner join code samples