Applying 3D Transforms
The XAML UI Framework does not directly expose full 3D capabilities. It does, however, enable you to perform the most common 3D effects with perspective transforms. These transforms escape the limitations of the 2D transforms by enabling you to rotate and translate an element in any or all of the three dimensions.
Perspective transforms are normally done with a class called PlaneProjection
, which defines RotationX
, RotationY
, and RotationZ
properties. The X and Y dimensions are defined as usual, and the Z dimension extends into and out of the screen, as illustrated in Figure 3.14. X increases from left-to-right, Y increases from top-to-bottom, and Z increases from back-to-front.
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.