CoreComponentInputSource Class

Definition

Provides a mechanism to receive input for a XAML framework element hosted in another framework, such as a DirectX interop framework.

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
Inheritance
Object Platform::Object IInspectable CoreComponentInputSource
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The CoreComponentInputSource class enables an app to handle input for a XAML framework element hosted in another framework, such as a DirectX interop framework. Call the CoreComponentInputSource.DispatcherQueue property to get the DispatcherQueue of the thread where the CoreComponentInputSource was instantiated.

Version history

Windows version SDK version Value added
1607 14393 ClosestInteractiveBoundsRequested
1607 14393 GetCurrentKeyEventDeviceId
1803 17134 DispatcherQueue

Properties

Dispatcher

Gets the input event dispatcher for the hosted XAML framework element.

DispatcherQueue

Gets the DispatcherQueue associated with this CoreComponentInputSource.

HasCapture

Indicates whether the input device supports input capture.

HasFocus

Gets whether the current hosted XAML control element has focus. If it does, keyboard input is delivered to that control.

IsInputEnabled

Gets or sets whether input is enabled for the hosted XAML framework element.

PointerCursor

Gets the pointer cursor used to specify interaction behavior with the hosted XAML framework element.

PointerPosition

Gets the current pointer position in the hosted XAML framework.

Methods

GetCurrentKeyEventDeviceId()

Retrieves the unique ID for the input device that generated this key event.

GetCurrentKeyEventDeviceId is not supported for all input devices.

GetCurrentKeyState(VirtualKey)

Gets the current status of a virtual key press.

ReleasePointerCapture()

Stops the capture of pointer input data (if the pointing device supports input capture).

SetPointerCapture()

Starts the capture of pointer input data (if the pointing device supports input capture).

Events

CharacterReceived

Raised when a character is received (such as from a completed key press sequence) by the hosted XAML element.

ClosestInteractiveBoundsRequested

Note

Not intended for general use.

Occurs when a framework input manager requests the bounding rectangle of an interactive element within a specific bounding rectangle and closest to a specific pointer.

GotFocus

Raised when a hosted XAML element gets focus.

InputEnabled

Raised when the hosted XAML control is enabled for input.

KeyDown

Raised when a key is pressed for the current active hosted XAML element.

KeyUp

Raised when a key press is released for the current active hosted XAML element.

LostFocus

Raised when a hosted XAML element loses focus.

PointerCaptureLost

Raised when the pointer input capture stream is lost.

PointerEntered

Raised when the pointer enters the hosted XAML element.

PointerExited

Raised when the pointer exits the hosted XAML element.

PointerMoved

Raised when the pointer is moved for the active hosted XAML element.

PointerPressed

Raised when the pointer is "pressed" (such as a mouse button click or full screen press) for the active hosted XAML element.

PointerReleased

Raised when the pointer is released (such as when a mouse button click or screen press is released) for the active hosted XAML element.

PointerWheelChanged

Raised when the mouse wheel is rotated for the active hosted XAML element.

TouchHitTesting

Raised for a touch hit test on a hosted XAML element.

Applies to

See also