CastingDevicePicker 类

定义

表示一个设备选取器,其中包含供用户选择的转换设备列表。

在桌面应用中,在以显示 UI 的方式使用此类实例之前,需要将 对象与其所有者的窗口句柄相关联。 有关详细信息和代码示例,请参阅 显示依赖于 CoreWindow 的 WinRT UI 对象

public ref class CastingDevicePicker sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [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 CastingDevicePicker final
/// [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)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class CastingDevicePicker final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[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 CastingDevicePicker
[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)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class CastingDevicePicker
function CastingDevicePicker()
Public NotInheritable Class CastingDevicePicker
继承
Object Platform::Object IInspectable CastingDevicePicker
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

构造函数

CastingDevicePicker()

创建 CastingDevicePicker 对象。

在桌面应用中,在以显示 UI 的方式使用此类实例之前,需要将 对象与其所有者的窗口句柄相关联。 有关详细信息和代码示例,请参阅 显示依赖于 CoreWindow 的 WinRT UI 对象

属性

Appearance

获取选取器 UI 的颜色。

Filter

获取要显示在选取器中的设备的筛选器信息。

方法

Hide()

隐藏设备选取器 UI。

Show(Rect)

显示强制转换设备选取器 UI,该 UI 从提供的矩形的边缘飞出。

Show(Rect, Placement)

显示强制转换设备选取器 UI,该 UI 从提供的矩形的指定边缘飞出。

事件

CastingDevicePickerDismissed

指示用户已关闭选取器 UI。

CastingDeviceSelected

指示用户已从选取器中选择了设备。

适用于