ScaleTransform3D

ScaleTransform3Ds are used to change the size of 3D objects. The scale factor is expressed in each dimension by the ScaleX, ScaleY, and ScaleZ properties. Because you can specify different scale factors for each dimension, it is possible to stretch an object using a ScaleTransform3D. For example, the following transform makes the house twice as wide along the x-axis, as shown in Figure 8.22:

Image

FIGURE 8.22 Scaling the house along the x-axis

<ModelVisual3D.Transform>  <ScaleTransform3D ScaleX="2"/></ModelVisual3D.Transform>

To change the size of a 3D object while maintaining its proportions, set the ...

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.