MaterialGroup.Children 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
자식 Material 개체의 컬렉션을 가져오거나 설정합니다.
public:
property System::Windows::Media::Media3D::MaterialCollection ^ Children { System::Windows::Media::Media3D::MaterialCollection ^ get(); void set(System::Windows::Media::Media3D::MaterialCollection ^ value); };
public System.Windows.Media.Media3D.MaterialCollection Children { get; set; }
member this.Children : System.Windows.Media.Media3D.MaterialCollection with get, set
Public Property Children As MaterialCollection
속성 값
자식 Material 개체를 포함하는 MaterialCollection입니다.
예제
다음 예제에서는 여러 자료를 추가 하는 방법을 보여 줍니다는 MaterialGroup합니다.
// The material property of GeometryModel3D specifies the material applied to the 3D object.
// In this sample the material applied to the 3D object is made up of two materials layered
// on top of each other - a DiffuseMaterial (gradient brush) with an EmissiveMaterial
// layered on top (blue SolidColorBrush). The EmmisiveMaterial alters the appearance of
// the gradient toward blue.
// Create a horizontal linear gradient with four stops.
LinearGradientBrush myHorizontalGradient = new LinearGradientBrush();
myHorizontalGradient.StartPoint = new Point(0, 0.5);
myHorizontalGradient.EndPoint = new Point(1, 0.5);
myHorizontalGradient.GradientStops.Add(new GradientStop(Colors.Yellow, 0.0));
myHorizontalGradient.GradientStops.Add(new GradientStop(Colors.Red, 0.25));
myHorizontalGradient.GradientStops.Add(new GradientStop(Colors.Blue, 0.75));
myHorizontalGradient.GradientStops.Add(new GradientStop(Colors.LimeGreen, 1.0));
// Define material that will use the gradient.
DiffuseMaterial myDiffuseMaterial = new DiffuseMaterial(myHorizontalGradient);
// Add this gradient to a MaterialGroup.
MaterialGroup myMaterialGroup = new MaterialGroup();
myMaterialGroup.Children.Add(myDiffuseMaterial);
// Define an Emissive Material with a blue brush.
Color c = new Color();
c.ScA = 1;
c.ScB = 255;
c.ScR = 0;
c.ScG = 0;
EmissiveMaterial myEmissiveMaterial = new EmissiveMaterial(new SolidColorBrush(c));
// Add the Emmisive Material to the Material Group.
myMaterialGroup.Children.Add(myEmissiveMaterial);
// Add the composite material to the 3D model.
myGeometryModel.Material = myMaterialGroup;
' The material property of GeometryModel3D specifies the material applied to the 3D object.
' In this sample the material applied to the 3D object is made up of two materials layered
' on top of each other - a DiffuseMaterial (gradient brush) with an EmissiveMaterial
' layered on top (blue SolidColorBrush). The EmmisiveMaterial alters the appearance of
' the gradient toward blue.
' Create a horizontal linear gradient with four stops.
Dim myHorizontalGradient As New LinearGradientBrush()
myHorizontalGradient.StartPoint = New Point(0, 0.5)
myHorizontalGradient.EndPoint = New Point(1, 0.5)
myHorizontalGradient.GradientStops.Add(New GradientStop(Colors.Yellow, 0.0))
myHorizontalGradient.GradientStops.Add(New GradientStop(Colors.Red, 0.25))
myHorizontalGradient.GradientStops.Add(New GradientStop(Colors.Blue, 0.75))
myHorizontalGradient.GradientStops.Add(New GradientStop(Colors.LimeGreen, 1.0))
' Define material that will use the gradient.
Dim myDiffuseMaterial As New DiffuseMaterial(myHorizontalGradient)
' Add this gradient to a MaterialGroup.
Dim myMaterialGroup As New MaterialGroup()
myMaterialGroup.Children.Add(myDiffuseMaterial)
' Define an Emissive Material with a blue brush.
Dim c As New Color()
c.ScA = 1
c.ScB = 255
c.ScR = 0
c.ScG = 0
Dim myEmissiveMaterial As New EmissiveMaterial(New SolidColorBrush(c))
' Add the Emmisive Material to the Material Group.
myMaterialGroup.Children.Add(myEmissiveMaterial)
' Add the composite material to the 3D model.
myGeometryModel.Material = myMaterialGroup
설명
종속성 속성 정보
식별자 필드 | ChildrenProperty |
메타 데이터 속성 설정 true |
없음 |