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)
XML Namespace:

public sealed class MaterialGroup : Material
/** @attribute ContentPropertyAttribute("Children") */ 
public final class MaterialGroup extends Material
public final class MaterialGroup extends 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 create a 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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0