Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-apply-material-to-the-front-and-back-of-a-3-d-object.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.9 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Apply Material to the Front and Back of a 3D Object 03/30/2017
3D objects [WPF], applying Material class
Material class [WPF], applying to both sides of 3D object
classes [WPF], Material
d93c8ad6-4939-4d29-9544-4d16d98093c1

How to: Apply Material to the Front and Back of a 3D Object

The following example shows how to apply a xref:System.Windows.Media.Media3D.Material to the front and back of a 3D object and animate the object to show both sides of the object. The xref:System.Windows.Media.Media3D.GeometryModel3D.Material%2A property of a xref:System.Windows.Media.Media3D.GeometryModel3D is used to apply a red xref:System.Windows.Media.Brush to the front side of the object and the xref:System.Windows.Media.Media3D.GeometryModel3D.BackMaterial%2A property of the xref:System.Windows.Media.Media3D.GeometryModel3D is used to apply a blue xref:System.Windows.Media.Brush to the back side of the object. The code below shows the application of the materials to the object:

[!code-xamlAnimation3DGallery_snip#BackMaterialAnimationExampleInline1]

Example

The following code shows the entire sample.

[!code-xamlAnimation3DGallery_snip#BackMaterialAnimationExampleWholePage]

See also