An infinitely large distant light source that emits light in a single direction. For example, a distant light could be used to represent sunlight.
public : sealed class DistantLight : CompositionLight, IDistantLight, IDistantLight2
struct winrt::Windows::UI::Composition::DistantLight : CompositionLight, IDistantLight, IDistantLight2
public sealed class DistantLight : CompositionLight, IDistantLight, IDistantLight2
Public NotInheritable Class DistantLight Inherits CompositionLight Implements IDistantLight, IDistantLight2
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
Windows.Foundation.UniversalApiContract (introduced v3)
_distantLight = _compositor.CreateDistantLight(); _distantLight.Color = Colors.Yellow; _distantLight.Direction = new Vector3(0,-1, 0); _distantLight.CoordinateSpace = root; _distantLight.Targets.Add(root);
DistantLight s and SpotLight s support direction.
|AmbientLight||A light source that emits non directional light that appears to have been reflected by everything in the scene.|
|DistantLight||An infinitely large distant light source that emits light in a single direction.|
|PointLight||A point source of light that emits light in all directions.|
|SpotLight||A light source that emits inner and outer cones of light.|
A Visual cannot be targeted by more than two non-ambient lights (PointLight, SpotLight or DistantLight).
|Color Color Color Color||
Color of the emitted DistantLight.
|Comment Comment Comment Comment||
A string to associate with the CompositionObject.(Inherited from CompositionObject)
|Compositor Compositor Compositor Compositor||CompositionObject)|
|CoordinateSpace CoordinateSpace CoordinateSpace CoordinateSpace||
The Visual used to determine the light’s direction. The light's Direction property is relative to this Visual’s coordinate space.
is a required property. If CoordinateSpace is not set, the DistantLight will not render.
|Direction Direction Direction Direction||
The direction in which the light is pointing, specified relative to its CoordinateSpace Visual.
|Dispatcher Dispatcher Dispatcher Dispatcher||
The dispatcher for the CompositionObject.(Inherited from CompositionObject)
|DispatcherQueue DispatcherQueue DispatcherQueue DispatcherQueue||
Gets the DispatcherQueue for the CompostionObject.(Inherited from CompositionObject)
|ExclusionsFromTargets ExclusionsFromTargets ExclusionsFromTargets ExclusionsFromTargets||
Gets a collection of Visuals that are not targeted by the light.(Inherited from CompositionLight)
|ImplicitAnimations ImplicitAnimations ImplicitAnimations ImplicitAnimations||
The collection of implicit animations attached to this object.(Inherited from CompositionObject)
|Intensity Intensity Intensity Intensity||
Gets or sets the intensity of the light.
|IsEnabled IsEnabled IsEnabled IsEnabled||
Gets or sets a value that determines whether the composition light is on.(Inherited from CompositionLight)
|Properties Properties Properties Properties||
The collection of properties associated with the CompositionObject.(Inherited from CompositionObject)
|Targets Targets Targets Targets||
The collection of Visuals targeted by the light.(Inherited from CompositionLight)