添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Given the Xbox display interface is HDMI-based, your first thought may be to attach to the HdmiDisplayInformation.DisplayModesChanged event. Don't. It doesn't provide enough information to solve this problem. Instead, turn to DeviceInformation.CreateWatcher and an Advanced Query String with the following selector:

System.Devices.InterfaceClassGuid:="{E6F07B5F-EE97-4a90-B076-33F57BF4EAA7}" AND
System.Devices.InterfaceEnabled:=System.StructuredQueryType.Boolean#True

The display device interface will toggle between enabled and disabled states and fire the appropriate watcher events.