DirectionalLight Constructor ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Creates an instance of a light that projects its effect in a specified direction.

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

public DirectionalLight()

This contructor creates an instance of a white light projected along a Vector3D of value (0,0,-1).

DirectionalLights have a direction, but no position in space.

The following code excerpt creates a DirectionalLight.

<DirectionalLight Color="#FFFFFFFF" Direction="-3,-4,-5" />

.NET Framework
Available since 3.0
Return to top