O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

TranslateTransform3D

TranslateTransform3D moves an object by an offset relative to its container. The offset is specified by the OffsetX, OffsetY, and OffsetZ properties. For example, setting the OffsetZ property to 3 slides the house forward on the z-axis by three units, as shown in Figure 8.21:

<ModelVisual3D.Transform>  <TranslateTransform3D OffsetZ="3"/></ModelVisual3D.Transform>

Image

FIGURE 8.21 Translating the house forward three units on the z-axis

You can position 3D objects more easily by constructing your models such that the origin is at a convenient location. For example, the house model has the origin roughly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required