Inclinometer.GetDefault | getDefault method

Applies to Windows and Windows Phone

Returns the default inclinometer.

Syntax


public:
static Inclinometer^ GetDefault()

Parameters

This method has no parameters.

Return value

Type: Inclinometer

The default inclinometer or null if no inclinometers are found.

Remarks

This method only returns values for hardware that has been integrated into the computer by the manufacturer. (The inclinometer readings are derived from multiple sensors.) 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.

The following example demonstrates how a Windows Store app built with XAML and C# used this method to establish a connection to the default inclinometer.


_inclinometer = Inclinometer.GetDefault();


The following example demonstrates how a Windows Store app built for Windows using JavaScript used this method to establish a connection to the default inclinometer.


inclinometer = Windows.Devices.Sensors.Inclinometer.getDefault();


Requirements

Minimum supported client

Windows 8

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

Inclinometer

 

 

Show:
© 2014 Microsoft. All rights reserved.