Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.29 KB

accelerometer_readingchanged.md

File metadata and controls

29 lines (19 loc) · 1.29 KB
-api-id -api-type
E:Windows.Devices.Sensors.Accelerometer.ReadingChanged
winrt event

Windows.Devices.Sensors.Accelerometer.ReadingChanged

-description

Occurs each time the accelerometer reports a new sensor reading.

-remarks

An application may register this event handler to obtain sensor readings. The application must establish a desired ReportInterval. This informs the sensor driver that resources should be allocated to satisfy the requirements of the application.

-examples

The following example demonstrates how a UWP app built with C# and XAML registers its ReadingChanged event handler.

[!code-csharpEnableReadingChangedCS]

The following example shows the ReadingChanged event handler.

[!code-csharpReadingChangedCS]

-see-also

Accelerometer sample (Windows 10)