Applying 3D Transforms

WPF includes rich 3D features that are covered in Chapter 8, “3D Graphics.” The other XAML UI frameworks do not have these features, but apps using these frameworks generally have access to DirectX with its full 3D graphics engine. In addition, every XAML framework—except, ironically, WPF—enables you to perform the most common 3D effects with simple 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 ...

Get XAML 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.