# Getting Started with WinUI LayoutTransformControl

This topic demonstrates how to use the RadLayoutTransformControl for WinUI.

## Assembly References

In order to use the RadLayoutTransformControl suite in your projects, you have to add references to the following assembly:

* `Telerik.WinUI.Controls.dll`
* `Telerik.Licensing.Runtime.dll`

## Defining a RadLayoutTransformControl

Here is how RadLayoutTransformControl is declared in XAML:

> You can access the **RadLayoutTransformControl** control through an alias pointing to the **Telerik.UI.Xaml.Controls.Input** namespace: `xmlns:telerikPrimitives="using:Telerik.UI.Xaml.Controls.Primitives"`

#### **Example 1: Adding a RadLayoutTransformControl in XAML**

```XAML
<telerikPrimitives:RadLayoutTransformControl />
```

## Applying Transformations

The RadLayoutTransformControl exposes a **LayoutTransform** which you can use to apply transformations to the content of the control. It is of type **Microsoft.UI.Xaml.Media.Transform**. Here's a list of possible transformations:

* **RotateTransform**
* **ScaleTransform**
* **SkewTransform**
* **MatrixTransform**
* **TransformGroup**

#### **Example 2: Applying a TransformGroup**

```XAML
<telerik:RadLayoutTransformControl x:Name="LayoutTransformControl">
	<telerik:RadLayoutTransformControl.LayoutTransform>
		<TransformGroup>
			<RotateTransform Angle="45" />
			<ScaleTransform ScaleX="2" ScaleY="2" />
			<SkewTransform AngleX="10" AngleY="10" />
		</TransformGroup>
	</telerik:RadLayoutTransformControl.LayoutTransform>
	<Border Background="LightBlue" Width="100" Height="100">
		<TextBlock Text="Content" HorizontalAlignment="Center" VerticalAlignment="Center" />
	</Border>
</telerik:RadLayoutTransformControl>
```

#### Figure 1: Border and TextBlock with applied transformations

![WinUI Border and TextBlock with applied transformations](https://www.telerik.com/winui/documentation/assets/ed4969fd4f801575743d4efac2c1cbf1/layoutcontrol-transformations.png)

You can also set the transformations in code, as shown in Example 3:

#### **Example 3: Applying a MatrixTransform**

```C#
this.LayoutTransformControl.LayoutTransform = new MatrixTransform() 
{ 
	Matrix = new Matrix() 
	{ 
		M11 = 0.3,
		M12 = 1, 
		M21 = 2, 
		M22 = 0, 
		OffsetX = 10, 
		OffsetY = 50 
	} 
};
```

#### Figure 2: RadLayoutTransformControl with MatrixTransform

![WinUI RadLayoutTransformControl with MatrixTransform](https://www.telerik.com/winui/documentation/assets/1ee0e29d97368718ddc4ea3f23375b2f/layoutcontrol-matrixtransformation.png)

## Telerik UI for WinUI Learning Resources

* [Telerik UI for WinUI LayoutTransformControl Component](https://www.telerik.com/winui/layouttransformcontrol)
* [Getting Started with Telerik UI for WinUI Components](https://www.telerik.com/winui/documentation/getting-started/first-steps-nuget)
* [Telerik UI for WinUI Installation](https://www.telerik.com/winui/documentation/installation-and-deployment/installing-which-file-do-i-need)
* [Telerik UI for WinUI Examples](https://www.telerik.com/winui/documentation/examples/demos-app)
* [Telerik UI for WinUI Accessibility](https://www.telerik.com/winui/documentation/common/accessibility)
* [Telerik UI for WinUI License Agreement](https://www.telerik.com/purchase/license-agreement/winui)
