Combining Transforms

If you want to transform an element multiple ways simultaneously, such as rotate and scale it, a few different options are available:

CompositeTransform

TransformGroup

MatrixTransform

CompositeTransform

The CompositeTransform class is the easiest way to combine transforms. It has all the properties of the previous four transforms, although some have slightly different names: Rotation, ScaleX, ScaleY, SkewX, SkewY, TranslateX, TranslateY, CenterX, and CenterY.

Figure 3.12 shows several transforms being applied to a single Button as follows:

<Button Background="Orange">   <Button.RenderTransform>     <!-- The composite transform order is always          scale, then skew, then rotate, then ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.