LightSensor.GetDefault Method

Returns the default ambient-light sensor.

Syntax

public:
static LightSensor^ GetDefault()  

Return value

Type: LightSensor 

The default ambient-light sensor or null if no integrated light sensors are found.

Remarks

This method only returns values for a light sensor that has been integrated into the computer by the manufacturer. A null value will be returned if the specified sensor is not available in the system.

When a system is in Connected Standby, a call to the GetDefault method will return immediately with a null result.

Requirements

Namespace: Windows.Devices.Sensors

Metadata: windows.winmd

See also

Reference

LightSensor Class

LightSensor Members

Windows.Devices.Sensors Namespace