Share via


CoreComponentInputSource 类

定义

提供一种机制,用于接收另一个框架中托管的 XAML 框架元素(例如 DirectX 互操作框架)的输入。

public ref class CoreComponentInputSource sealed : ICoreInputSourceBase, ICorePointerInputSource
public ref class CoreComponentInputSource sealed : ICoreInputSourceBase, ICorePointerInputSource2
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class CoreComponentInputSource final : ICoreInputSourceBase, ICorePointerInputSource
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class CoreComponentInputSource final : ICoreInputSourceBase, ICorePointerInputSource2
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class CoreComponentInputSource : ICoreInputSourceBase, ICorePointerInputSource
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class CoreComponentInputSource : ICoreInputSourceBase, ICorePointerInputSource2
Public NotInheritable Class CoreComponentInputSource
Implements ICoreInputSourceBase, ICorePointerInputSource
Public NotInheritable Class CoreComponentInputSource
Implements ICoreInputSourceBase, ICorePointerInputSource2
继承
Object Platform::Object IInspectable CoreComponentInputSource
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

CoreComponentInputSource 类使应用能够处理另一个框架中托管的 XAML 框架元素(如 DirectX 互操作框架)的输入。 调用 CoreComponentInputSource.DispatcherQueue 属性以获取实例化 CoreComponentInputSource 的线程的 DispatcherQueue。

版本历史记录

Windows 版本 SDK 版本 已添加值
1607 14393 ClosestInteractiveBoundsRequested
1607 14393 GetCurrentKeyEventDeviceId
1803 17134 DispatcherQueue

属性

Dispatcher

获取托管 XAML 框架元素的输入事件调度程序。

DispatcherQueue

获取与此 CoreComponentInputSource 关联的 DispatcherQueue

HasCapture

指示输入设备是否支持输入捕获。

HasFocus

获取当前托管的 XAML 控件元素是否具有焦点。 如果这样做,键盘输入将传送到该控件。

IsInputEnabled

获取或设置是否为托管的 XAML 框架元素启用输入。

PointerCursor

获取用于指定与托管 XAML 框架元素的交互行为的指针游标。

PointerPosition

获取托管 XAML 框架中的当前指针位置。

方法

GetCurrentKeyEventDeviceId()

检索生成此密钥事件的输入设备的唯一 ID。

并非所有输入设备都支持 GetCurrentKeyEventDeviceId。

GetCurrentKeyState(VirtualKey)

获取虚拟按键的当前状态。

ReleasePointerCapture()

如果指向设备支持输入捕获) ,则停止 (指针输入数据的捕获。

SetPointerCapture()

如果指针设备支持输入捕获) , (启动指针输入数据的捕获。

事件

CharacterReceived

当从托管 XAML 元素) 的已完成的按键序列 (接收字符时引发。

ClosestInteractiveBoundsRequested

注意

不适合一般用途。

当框架输入管理器请求特定边界矩形内且最接近特定指针的交互式元素的边框时发生。

GotFocus

当托管 XAML 元素获得焦点时引发。

InputEnabled

为输入启用托管 XAML 控件时引发。

KeyDown

为当前活动托管的 XAML 元素按下键时引发。

KeyUp

为当前活动托管的 XAML 元素释放按键时引发。

LostFocus

当托管的 XAML 元素失去焦点时引发。

PointerCaptureLost

指针输入捕获流丢失时引发。

PointerEntered

当指针进入托管的 XAML 元素时引发。

PointerExited

当指针退出托管的 XAML 元素时引发。

PointerMoved

移动活动托管 XAML 元素的指针时引发。

PointerPressed

当指针被“按下” (例如鼠标按钮单击或全屏按下活动托管 XAML 元素) 时引发。

PointerReleased

释放指针时引发 (例如,当鼠标按钮单击或屏幕按下时释放) 活动托管 XAML 元素。

PointerWheelChanged

为活动托管的 XAML 元素旋转鼠标滚轮时引发。

TouchHitTesting

为托管 XAML 元素上的触摸命中测试引发。

适用于

另请参阅