Light.Color Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the color of the light.
public:
property System::Windows::Media::Color Color { System::Windows::Media::Color get(); void set(System::Windows::Media::Color value); };
public System.Windows.Media.Color Color { get; set; }
member this.Color : System.Windows.Media.Color with get, set
Public Property Color As Color
Property Value
Color of the light.
Examples
The following excerpts show this property applied to various Light3D objects.
<ModelVisual3D.Content>
<AmbientLight Color="#333333" />
</ModelVisual3D.Content>
public MyLights()
{
for (int i = 0; i < nbrDirLights; i++)
{
_dirLight[i] = new DirectionalLight();
_dirLight[i].Color = _dirLightColor[i];
_dirLight[i].Direction = _dirVector[i];
}
_ptLight.Position = new Point3D(-3, -7, 10);
_ptLight.Color = System.Windows.Media.Brushes.White.Color;
_ptLight.Range = 15.0;
_ptLight.ConstantAttenuation = 3.0;
}
Public Sub New()
For i As Integer = 0 To nbrDirLights - 1
_dirLight(i) = New DirectionalLight()
_dirLight(i).Color = _dirLightColor(i)
_dirLight(i).Direction = _dirVector(i)
Next i
_ptLight.Position = New Point3D(-3, -7, 10)
_ptLight.Color = System.Windows.Media.Brushes.White.Color
_ptLight.Range = 15.0
_ptLight.ConstantAttenuation = 3.0
End Sub
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET