This documentation is archived and is not being maintained.

MaterialGroup Class

Represents a Material that is a composite of the Materials in its collection.

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

public sealed class MaterialGroup : Material

Because DiffuseMaterial, SpecularMaterial, and EmissiveMaterial provide distinctly different effects, it's useful to combine them. For example, you might choose to apply a complex texture to a mesh using DiffuseMaterial, while adding a highlighting effect with a SpecularMaterial on the same mesh. MaterialGroup allows you to treat these Materials as a single texture for convenience.

The following excerpt shows a MaterialGroup.

<MaterialGroup x:Key="LeavesMaterial1">
      <ImageBrush Stretch="UniformToFill" ImageSource="sample_images\leaves_closeup.png" TileMode="None" ViewportUnits="Absolute" Viewport="0 0 1 1" AlignmentX="Left" AlignmentY="Top" Opacity="1.000000" />
  <SpecularMaterial SpecularPower="85.3333">
      <SolidColorBrush Color="#FFFFFF" Opacity="1.000000"/>

More Code

How to: Apply Emissive Material to a 3-D Object The following example shows how to use EmissiveMaterial to add color to an existing Material equal to the color of the EmissiveMaterial's brush. The code below shows DiffuseMaterial and EmissiveMaterial applied in combination to add blue to the DiffuseMaterial's appearance.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0