PointLightBase.Range Property

 

Gets or sets the distance beyond which the light has no effect.

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

public double Range { get; set; }

Property Value

Type: System.Double

Double that specifies the distance beyond which the light has no effect.

Identifier field

RangeProperty

Metadata properties set to true

None

The following example sets this property in code.

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: