title | description | ms.date | ms.custom | dev_langs | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|---|---|
How to: Apply Multiple Transformations to a 3D Model |
Learn how to apply Multiple Transformations to a 3D Model. |
03/30/2017 |
devdivchpfy22 |
|
|
cb72245a-5560-4c96-9f58-593c66296992 |
This sample shows how to use a xref:System.Windows.Media.Media3D.RotateTransform3D and a xref:System.Windows.Media.Media3D.ScaleTransform3D to rotate and change the scale of a 3D model. The code below shows how to apply these transforms to the xref:System.Windows.Media.Media3D.Model3D.Transform%2A property of a xref:System.Windows.Media.Media3D.GeometryModel3D in XAML.
[!code-xaml3DGallery_snip#Multiple3DTransformationsExampleInline1]
In code:
[!code-csharp3DGallery_procedural_snip#Multiple3DTransformationsCodeExampleInline1] [!code-vb3DGallery_procedural_snip#Multiple3DTransformationsCodeExampleInline1]
The following code shows the entire sample in XAML.
[!code-xaml3DGallery_snip#Multiple3DTransformationsExampleWholePage]
Below is the entire sample in code.
[!code-csharp3DGallery_procedural_snip#Multiple3DTransformationsCodeExampleWholePage] [!code-vb3DGallery_procedural_snip#Multiple3DTransformationsCodeExampleWholePage]