Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-transform-the-scale-of-a-3-d-model.md
T
Andy De George da363692ff Initial WPF content migrated (#17)
* Reset branch for WPF changes

* Convert BMP to PNG; fix link-out-of-scope err

* Add snippets for WPF... 6794 files!!!!

* Add missing snippets

* update file updated between migration

* Fix paths to include

* update breadcrumb and toc

* fix index links

* fix index links

* fix index links

* fix markdown
2020-09-04 09:46:28 -07:00

1.7 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Transform the Scale of a 3D Model 03/30/2017
scaling [WPF], 3D objects
3D objects [WPF], scaling
f3fdfe33-f7dc-44b0-84a5-e43b89947f35

How to: Transform the Scale of a 3D Model

This example shows how to scale a 3D object. To scale a 3D object, use a xref:System.Windows.Media.Media3D.ScaleTransform3D. The xref:System.Windows.Media.Media3D.ScaleTransform3D.ScaleX%2A, xref:System.Windows.Media.Media3D.ScaleTransform3D.ScaleY%2A, and xref:System.Windows.Media.Media3D.ScaleTransform3D.ScaleZ%2A properties resize the element by the factor you specify. For example, a xref:System.Windows.Media.Media3D.ScaleTransform3D.ScaleX%2A value of 1.5 stretches an object to 150 percent of its original width. A xref:System.Windows.Media.Media3D.ScaleTransform3D.ScaleY%2A value of 0.5 shrinks the height of an object by 50 percent. The code below shows using a xref:System.Windows.Media.Media3D.ScaleTransform3D as the transform for a xref:System.Windows.Media.Media3D.GeometryModel3D.

[!code-xaml3DGallery_snip#ScaleTransform3DExampleInline1]

Example

The following code shows the entire sample.

[!code-xaml3DGallery_snip#ScaleTransform3DExampleWholePage]

See also