ICoreWindow ICoreWindow ICoreWindow ICoreWindow Interface

Definition

Specifies an interface for a window object and its input events as well as basic user interface behaviors.

public : interface ICoreWindow
struct winrt::Windows::UI::Core::ICoreWindow
public interface ICoreWindow
Public Interface ICoreWindow
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

AutomationHostProvider AutomationHostProvider AutomationHostProvider AutomationHostProvider

Specifies the property that gets the automation provider assigned to this window.

Bounds Bounds Bounds Bounds

Specifies the property that gets the bounding rectangle of the window.

CustomProperties CustomProperties CustomProperties CustomProperties

Specifies a property that gets the set of custom properties for the window.

Dispatcher Dispatcher Dispatcher Dispatcher

Specifies a property that gets the event dispatcher for the window.

FlowDirection FlowDirection FlowDirection FlowDirection

Specifies the property that gets or sets the horizontal origin of the window's reading order alignment. If the language specified by the user interface is right-aligned (such as in Arabic or Hebrew), the horizontal origin of the reading layout for the window is on the right edge.

IsInputEnabled IsInputEnabled IsInputEnabled IsInputEnabled

Specifies a property that gets or sets whether input is enabled for the window.

PointerCursor PointerCursor PointerCursor PointerCursor

Specifies a property that gets or sets the cursor used by the window.

PointerPosition PointerPosition PointerPosition PointerPosition

Specifies a property that gets the position of the pointer.

Visible Visible Visible Visible

Specifies the property that gets whether the window is visible or not.

Methods

Activate() Activate() Activate() Activate()

Specifies a method that activates the window. This method is called to present the window on the screen.

Close() Close() Close() Close()

Specifies the method that closes the window and exits the message loop.

GetAsyncKeyState(VirtualKey) GetAsyncKeyState(VirtualKey) GetAsyncKeyState(VirtualKey) GetAsyncKeyState(VirtualKey)

Specifies a method that returns the state of a virtual key asynchronously.

GetKeyState(VirtualKey) GetKeyState(VirtualKey) GetKeyState(VirtualKey) GetKeyState(VirtualKey)

Specifies a method that gets the state of a key.

ReleasePointerCapture() ReleasePointerCapture() ReleasePointerCapture() ReleasePointerCapture()

Specifies a method that dissociates pointer input from the app, if previously associated through SetPointerCapture, and restores normal pointer input processing.

SetPointerCapture() SetPointerCapture() SetPointerCapture() SetPointerCapture()

Specifies a method that associates pointer input with the app. Once a pointer is captured, all subsequent events associated with that pointer are fired by the app.

A pointer can be captured only by a single app at any time.

Pointer events continue even if the pointer moves outside the bounds of the app.

Events

Activated Activated Activated Activated

Specifies the event that is fired when the window completes activation or deactivation.

AutomationProviderRequested AutomationProviderRequested AutomationProviderRequested AutomationProviderRequested

Specifies the event that is fired when a request for an automation handler is generated.

CharacterReceived CharacterReceived CharacterReceived CharacterReceived

Specifies the event that is fired when a new character is received by the input queue.

Closed Closed Closed Closed

Specifies the event that is fired when a window is closed (or the app terminates altogether).

InputEnabled InputEnabled InputEnabled InputEnabled

Specifies an event that occurs when input is enabled or disabled for the window.

KeyDown KeyDown KeyDown KeyDown

Specifies the event that is fired when a non-system key is pressed down.

KeyUp KeyUp KeyUp KeyUp

Specifies the event that is fired when a non-system key is released after a press.

PointerCaptureLost PointerCaptureLost PointerCaptureLost PointerCaptureLost

Specifies the event that occurs when a pointer moves to another window. This event is fired after PointerExited and is the final pointer event that is raised for a window.

PointerEntered PointerEntered PointerEntered PointerEntered

Specifies the event that occurs when a pointer moves into the bounding box of the window.

PointerExited PointerExited PointerExited PointerExited

Specifies the event that occurs when the pointer moves outside the bounding box of the window.

PointerMoved PointerMoved PointerMoved PointerMoved

Specifies the event that occurs when a pointer moves within the bounding box of the window.

PointerPressed PointerPressed PointerPressed PointerPressed

Occurs when a mouse button is clicked, or the digitizer surface has been touched by a finger or pen, within the bounding rectangle of the app.

An interaction session starts when a single contact is detected and ends when that contact, and all subsequent contacts in the same session, are no longer detected.

This event is fired for the first contact detected in the interaction session. Details for all other concurrent contact pointers are exposed through a PointerPointProperties object (obtained by getting the Properties property from a PointerPoint object).

PointerReleased PointerReleased PointerReleased PointerReleased

Occurs when a pressed mouse button is released, or a touch or pen contact is lifted from the digitizer surface, within the bounding rectangle of the app (or outside the bounding rectangle, if the pointer is captured).

An interaction session starts when a single contact is detected and ends when that contact, and all subsequent contacts in the same session, are no longer detected.

This event is fired for each contact detected in the interaction session (except for mouse, where this event is fired only when the last mouse button is released).

PointerWheelChanged PointerWheelChanged PointerWheelChanged PointerWheelChanged

Specifies the event that occurs when the mouse wheel is rotated.

SizeChanged SizeChanged SizeChanged SizeChanged

Specifies the event that raises when the window size is changed.

TouchHitTesting TouchHitTesting TouchHitTesting TouchHitTesting

Specifies the event that occurs when a touch contact area falls within a window that is registered for touch hit testing.

VisibilityChanged VisibilityChanged VisibilityChanged VisibilityChanged

Specifies the event that occurs when the window visibility is changed.