AmbientLight AmbientLight AmbientLight Class

Definition

A light that illuminates every targeted Visual equally.

public : sealed class AmbientLight : CompositionLight, IAmbientLight, IAmbientLight2
public sealed class AmbientLight : CompositionLight, IAmbientLight, IAmbientLight2
Public NotInheritable Class AmbientLight Inherits CompositionLight Implements IAmbientLight, IAmbientLight2
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Examples


            _ambientLight = _compositor.CreateAmbientLight(); 
            _ambientLight.Color = Colors.Yellow; 
            _ambientLight.Targets.Add(root); 

Remarks

AmbientLight is one of the four light types derived from CompositionLight.

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

Color Color Color

Color of the light. Animatable.

public : Color Color { get; set; }
public Color Color { get; set; }
Public ReadWrite Property Color As Color
Value
Color Color Color

The color of the ambient light.

Comment Comment Comment

Inherited from CompositionObject

Compositor Compositor Compositor

Inherited from CompositionObject

Dispatcher Dispatcher Dispatcher

Inherited from CompositionObject

DispatcherQueue DispatcherQueue DispatcherQueue

Inherited from CompositionObject

ExclusionsFromTargets ExclusionsFromTargets ExclusionsFromTargets

Inherited from CompositionLight

ImplicitAnimations ImplicitAnimations ImplicitAnimations

Inherited from CompositionObject

Intensity Intensity Intensity

Gets or sets the intensity of the light.

public : float Intensity { get; set; }
public float Intensity { get; set; }
Public ReadWrite Property Intensity As float
Value
float float float

The intensity of the light.

Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Properties Properties Properties

Inherited from CompositionObject

Targets Targets Targets

Inherited from CompositionLight

Methods

Close Close Close

Inherited from CompositionObject

StartAnimation(String,CompositionAnimation) StartAnimation(String,CompositionAnimation) StartAnimation(String,CompositionAnimation)

Inherited from CompositionObject

StartAnimationGroup(ICompositionAnimationBase) StartAnimationGroup(ICompositionAnimationBase) StartAnimationGroup(ICompositionAnimationBase)

Inherited from CompositionObject

StopAnimation(String) StopAnimation(String) StopAnimation(String)

Inherited from CompositionObject

StopAnimationGroup(ICompositionAnimationBase) StopAnimationGroup(ICompositionAnimationBase) StopAnimationGroup(ICompositionAnimationBase)

Inherited from CompositionObject

See Also