Magnetometer class

Applies to Windows Phone only

Represents a magnetic sensor.

Syntax


public sealed class Magnetometer

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

Members

The Magnetometer class has these types of members:

Events

The Magnetometer class has these events.

EventDescription
ReadingChanged Occurs each time the compass reports a new sensor reading.

 

Methods

The Magnetometer class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
GetCurrentReading Gets the current magnetometer reading.
GetDefault Returns the default magnetometer.

 

Properties

The Magnetometer class has these properties.

PropertyAccess typeDescription

DeviceId

Read-onlyGets the device identifier.

MinimumReportInterval

Read-onlyGets the minimum report interval supported by the magnetometer.

ReportInterval

Read/writeGets or sets the current report interval for the magnetometer.

 

Requirements

Minimum supported client

None supported [Windows Store apps only]

Minimum supported server

None supported [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Devices.Sensors
Windows::Devices::Sensors [C++]

Metadata

Windows.winmd

See also

Object

 

 

Show:
© 2014 Microsoft