CompositionLight CompositionLight CompositionLight CompositionLight Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
Base class for a light source that can target a UI scene.

The CompositionLight.Targets property determines which Visuals are lit.

public : class CompositionLight : CompositionObject, ICompositionLight, ICompositionLight2public class CompositionLight : CompositionObject, ICompositionLight, ICompositionLight2Public Class CompositionLight Inherits CompositionObject Implements ICompositionLight, ICompositionLight2// This API is not available in Javascript.
Inheritance
CompositionLightCompositionLightCompositionLightCompositionLight
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Inherited Members

Inherited methods

Inherited properties

Remarks

CompositionLight is the base class for four light types.

LightDescription
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.
Note

A Visual cannot be targeted by more than two non-ambient lights (PointLight, SpotLight or DistantLight).

Properties

ExclusionsFromTargets ExclusionsFromTargets ExclusionsFromTargets ExclusionsFromTargets

Prerelease. Gets a collection of Visuals that are not targeted by the light.

public : VisualUnorderedCollection ExclusionsFromTargets { get; }public VisualUnorderedCollection ExclusionsFromTargets { get; }Public ReadOnly Property ExclusionsFromTargets As VisualUnorderedCollection// This API is not available in Javascript.
Value
VisualUnorderedCollection VisualUnorderedCollection VisualUnorderedCollection VisualUnorderedCollection

The collection of Visuals that are not targeted by the light.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Targets Targets Targets Targets

The collection of Visuals targeted by the light.

public : VisualUnorderedCollection Targets { get; }public VisualUnorderedCollection Targets { get; }Public ReadOnly Property Targets As VisualUnorderedCollection// This API is not available in Javascript.

See Also