Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Material Property
Collapse the table of content
Expand the table of content

GeometryModel3D.Material Property

Gets or sets the Material used to render the front of this GeometryModel3D.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public Material Material { get; set; }

Identifier field

MaterialProperty

Metadata properties set to true

None

The following code excerpt defines a SolidColorBrush as a DiffuseMaterial on a GeometryModel3D.

<ModelVisual3D>
  <ModelVisual3D.Content>
    <GeometryModel3D Geometry="{StaticResource myTeapot}">
      <GeometryModel3D.Material>
        <DiffuseMaterial>
          <DiffuseMaterial.Brush>
            <SolidColorBrush Color="Blue" Opacity="1.0" />
          </DiffuseMaterial.Brush>
        </DiffuseMaterial>
      </GeometryModel3D.Material>
      <GeometryModel3D.Transform>
        <RotateTransform3D>
          <RotateTransform3D.Rotation>
            <AxisAngleRotation3D x:Name="myAngleRotation" Axis="0,3,0" Angle="1" />
          </RotateTransform3D.Rotation>
        </RotateTransform3D>
      </GeometryModel3D.Transform>
    </GeometryModel3D>
  </ModelVisual3D.Content>
</ModelVisual3D>

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft