Light.Color Property

 

Gets or sets the color of the light.

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

public Color Color { get; set; }

Property Value

Type: System.Windows.Media.Color

Color of the light.

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;
}

.NET Framework
Available since 3.0
Return to top
Show: