Inclinometer.GetDefault Inclinometer.GetDefault Inclinometer.GetDefault Inclinometer.GetDefault Inclinometer.GetDefault Method

Definition

Overloads

GetDefault() GetDefault() GetDefault() GetDefault() GetDefault()

Returns the default inclinometer for absolute readings.

GetDefault(SensorReadingType) GetDefault(SensorReadingType) GetDefault(SensorReadingType) GetDefault(SensorReadingType) GetDefault(SensorReadingType)

Returns the default inclinometer based on the SensorReadingType.

GetDefault() GetDefault() GetDefault() GetDefault() GetDefault()

Returns the default inclinometer for absolute readings.

public : static Inclinometer GetDefault()
static Inclinometer GetDefault() const;
public static Inclinometer GetDefault()
Public Shared Function GetDefault() As Inclinometer
var inclinometer = Windows.Devices.Sensors.Inclinometer.getDefault();

Returns

The default inclinometer or null if no inclinometers are found.

Remarks

This method returns the same result as GetDefault(SensorReadingType.Absolute)

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 UWP 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 UWP app built for Windows using JavaScript used this method to establish a connection to the default inclinometer.

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

GetDefault(SensorReadingType) GetDefault(SensorReadingType) GetDefault(SensorReadingType) GetDefault(SensorReadingType) GetDefault(SensorReadingType)

Returns the default inclinometer based on the SensorReadingType.

public : static Inclinometer GetDefault(SensorReadingType sensorReadingtype)
static Inclinometer GetDefault(SensorReadingType sensorReadingtype) const;
public static Inclinometer GetDefault(SensorReadingType sensorReadingtype)
Public Shared Function GetDefault(sensorReadingtype As SensorReadingType) As Inclinometer
var inclinometer = Windows.Devices.Sensors.Inclinometer.getDefault(sensorReadingtype);

Parameters

sensorReadingtype
SensorReadingType SensorReadingType SensorReadingType

The type of sensor to retrieve.

Returns

The default inclinometer or null if no inclinometers are found.

Additional features and requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

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.

See also