Lamp.DeviceId 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取灯设备的 DeviceInformation ID 。
public:
property Platform::String ^ DeviceId { Platform::String ^ get(); };
winrt::hstring DeviceId();
public string DeviceId { get; }
var string = lamp.deviceId;
Public ReadOnly Property DeviceId As String
属性值
灯设备的 DeviceInformation ID 。
注解
将此 ID 传递给 FromIdAsync 方法以检索关联的 Lamp 对象。 实现 DeviceWatcher.Removed 事件的处理程序,并将 DeviceInformationUpdate 参数的 ID 与 Lamp 对象的 ID 进行比较,以便在设备不可用时收到通知。