Delen via


DeviceConnectionChangeTrigger Class

Definition

Represents a trigger that launches a background task when the connection status of a device changes.

public ref class DeviceConnectionChangeTrigger sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class DeviceConnectionChangeTrigger final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class DeviceConnectionChangeTrigger
Public NotInheritable Class DeviceConnectionChangeTrigger
Inheritance
Object Platform::Object IInspectable DeviceConnectionChangeTrigger
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Properties

CanMaintainConnection

Gets whether the system can maintain a connection to the specified device.

DeviceId

Gets the device Id associated with the device.

MaintainConnection

Gets or sets whether the system should automatically attempt to keep the referenced device connected.

Methods

FromIdAsync(String)

Begins an asynchronous operation to get the DeviceConnectionChangeTrigger associated with the specified Id.

Applies to

See also