CoreComponentInputSource 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供一種機制,以接收裝載于另一個架構之 XAML 架構專案的輸入,例如 DirectX Interop 架構。
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
- 繼承
- 屬性
- 實作
Windows 需求
| 裝置系列 |
Windows 10 (已於 10.0.10240.0 引進)
|
| API contract |
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
|
備註
CoreComponentInputSource 類別可讓應用程式處理裝載在另一個架構中的 XAML 架構元素輸入,例如 DirectX Interop 架構。 呼叫 CoreComponentInputSource.DispatcherQueue 屬性,以取得 CoreComponentInputSource 具現化之執行緒的 DispatcherQueue。
版本歷程記錄
| Windows 版本 | SDK 版本 | 新增值 |
|---|---|---|
| 1607 | 14393 | ClosestInteractiveBoundsRequested |
| 1607 | 14393 | GetCurrentKeyEventDeviceId |
| 1803 | 17134 | DispatcherQueue |
屬性
| Dispatcher |
取得託管 XAML 架構專案的輸入事件發送器。 |
| DispatcherQueue | |
| HasCapture |
指出輸入裝置是否支援輸入擷取。 |
| HasFocus |
取得目前裝載的 XAML 控制項專案是否有焦點。 如果這樣做,鍵盤輸入會傳遞至該控制項。 |
| IsInputEnabled |
取得或設定是否為裝載的 XAML 架構專案啟用輸入。 |
| PointerCursor |
取得指標資料指標,用來指定與託管 XAML 架構專案的互動行為。 |
| PointerPosition |
取得託管 XAML 架構中的目前指標位置。 |
方法
| 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 元素上引發觸控點擊測試。 |