Light Sensor

With the ambient light sensor, you can automatically dim, brighten, or otherwise adjust your app’s content based on the surrounding lighting conditions. (If you do this, please make it optional, otherwise you will annoy users like me!)

The light sensor once again follows the same pattern as the others. The class is called LightSensor and the readings returned are of type LightSensorReading. This has two properties: IlluminanceInLux and Timestamp. IlluminanceInLux measures the amount of light in lux units.

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.