LayoutTransformControl
The LayoutTransformControl is a control that applies Matrix transformations on any FrameworkElement
of your application.
The transformations that can be applied are one of the following:
Syntax
<controls:LayoutTransformControl Background="Black"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RenderTransformOrigin="0.5,0.5">
<controls:LayoutTransformControl.Transform>
<RotateTransform Angle="90" />
</controls:LayoutTransformControl.Transform>
<Border HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderBrush="Red"
BorderThickness="5">
<Grid>
<TextBlock Padding="10" Foreground="White" Text="This is a test message." />
</Grid>
</Border>
</controls:LayoutTransformControl>
Properties
Property | Type | Description |
---|---|---|
Child | FrameworkElement | The content of the control that will receive matrix transformations |
Transform | Transform | The transformations to apply on the Content . It can be a single transformation like RotateTransform , ScaleTransform or SkewTransform or it can be a combo of multiple transformations using TransformGroup |
Sample Project
LayoutTransformControl Sample Page. You can see this in action in the Windows Community Toolkit Sample App.
Requirements
Device family | Universal, 10.0.16299.0 or higher |
---|---|
Namespace | Microsoft.Toolkit.Uwp.UI.Controls |
NuGet package | Microsoft.Toolkit.Uwp.UI.Controls |