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 ICoreWindowpublic interface ICoreWindowPublic Interface ICoreWindow// This API is not available in Javascript.
- Attributes
| 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.
public : PlatForm::Object AutomationHostProvider { get; }public object AutomationHostProvider { get; }Public ReadOnly Property AutomationHostProvider As object// This API is not available in Javascript.
- Value
- PlatForm::Object object object object
The automation provider for this window.
Bounds Bounds Bounds Bounds
Specifies the property that gets the bounding rectangle of the window.
public : Rect Bounds { get; }public Rect Bounds { get; }Public ReadOnly Property Bounds As Rect// This API is not available in Javascript.
Remarks
To convert from device-independent pixel (DIP) to physical pixels (and back), use the following equations (where DPI is the dots per inch value for the screen):
- DIP value = (physical pixel x 96) / DPI
- physical pixel value = (DIP x DPI) / 96
- See Also
CustomProperties CustomProperties CustomProperties CustomProperties
Specifies a property that gets the set of custom properties for the window.
public : IPropertySet CustomProperties { get; }public IPropertySet CustomProperties { get; }Public ReadOnly Property CustomProperties As IPropertySet// This API is not available in Javascript.
The set of custom properties for the window, represented as tuples.
- See Also
Dispatcher Dispatcher Dispatcher Dispatcher
Specifies a property that gets the event dispatcher for the window.
public : CoreDispatcher Dispatcher { get; }public CoreDispatcher Dispatcher { get; }Public ReadOnly Property Dispatcher As CoreDispatcher// This API is not available in Javascript.
The event dispatcher for the window.
- See Also
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.
public : CoreWindowFlowDirection FlowDirection { get; set; }public CoreWindowFlowDirection FlowDirection { get; set; }Public ReadWrite Property FlowDirection As CoreWindowFlowDirection// This API is not available in Javascript.
- Value
- CoreWindowFlowDirection CoreWindowFlowDirection CoreWindowFlowDirection CoreWindowFlowDirection
The flow direction of the window's reading layout.
- See Also
IsInputEnabled IsInputEnabled IsInputEnabled IsInputEnabled
Specifies a property that gets or sets whether input is enabled for the window.
public : PlatForm::Boolean IsInputEnabled { get; set; }public bool IsInputEnabled { get; set; }Public ReadWrite Property IsInputEnabled As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
True if input is enabled for the window; false if it is disabled.
PointerCursor PointerCursor PointerCursor PointerCursor
Specifies a property that gets or sets the cursor used by the window.
public : CoreCursor PointerCursor { get; set; }public CoreCursor PointerCursor { get; set; }Public ReadWrite Property PointerCursor As CoreCursor// This API is not available in Javascript.
The window's cursor.
PointerPosition PointerPosition PointerPosition PointerPosition
Specifies a property that gets the position of the pointer.
public : Point PointerPosition { get; }public Point PointerPosition { get; }Public ReadOnly Property PointerPosition As Point// This API is not available in Javascript.
Visible Visible Visible Visible
Specifies the property that gets whether the window is visible or not.
public : PlatForm::Boolean Visible { get; }public bool Visible { get; }Public ReadOnly Property Visible As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
True if the window is visible on the screen; false if it is not.
Methods
Activate() Activate() Activate() Activate()
Specifies a method that activates the window. This method is called to present the window on the screen.
public : void Activate()public void Activate()Public Function Activate() As void// This API is not available in Javascript.
Remarks
The window will be presented if the app is the foreground window. If the app has more than one window, the activating window will be presented when the app is set to the foreground.
Close() Close() Close() Close()
Specifies the method that closes the window and exits the message loop.
public : void Close()public void Close()Public Function Close() As void// This API is not available in Javascript.
Remarks
This method also causes the ProcessEvents operation to exit the event processing loop.
GetAsyncKeyState(VirtualKey) GetAsyncKeyState(VirtualKey) GetAsyncKeyState(VirtualKey) GetAsyncKeyState(VirtualKey)
Specifies a method that returns the state of a virtual key asynchronously.
public : CoreVirtualKeyStates GetAsyncKeyState(VirtualKey virtualKey)public CoreVirtualKeyStates GetAsyncKeyState(VirtualKey virtualKey)Public Function GetAsyncKeyState(virtualKey As VirtualKey) As CoreVirtualKeyStates// This API is not available in Javascript.
- virtualKey
- VirtualKey VirtualKey VirtualKey VirtualKey
The virtual key for which state will be returned.
The state of the supplied virtual key when the input event was raised.
GetKeyState(VirtualKey) GetKeyState(VirtualKey) GetKeyState(VirtualKey) GetKeyState(VirtualKey)
Specifies a method that gets the state of a key.
public : CoreVirtualKeyStates GetKeyState(VirtualKey virtualKey)public CoreVirtualKeyStates GetKeyState(VirtualKey virtualKey)Public Function GetKeyState(virtualKey As VirtualKey) As CoreVirtualKeyStates// This API is not available in Javascript.
- virtualKey
- VirtualKey VirtualKey VirtualKey VirtualKey
The virtual key for which state will be returned.
The state of the supplied virtual key when the input event was raised.
- See Also
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.
public : void ReleasePointerCapture()public void ReleasePointerCapture()Public Function ReleasePointerCapture() As void// This API is not available in Javascript.
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.
public : void SetPointerCapture()public void SetPointerCapture()Public Function SetPointerCapture() As void// This API is not available in Javascript.
Remarks
Only the foreground window can capture the pointer.
A pointer can only be captured when contact is detected (mouse button pressed, touch contact down, stylus in contact), and the pointer is within the bounding rectangle of the app.
The pointer is released on a PointerReleased or a PointerCaptureLost event, or ReleasePointerCapture is explicitly called.
Events
Activated Activated Activated Activated
Specifies the event that is fired when the window completes activation or deactivation.
public : abstract event TypedEventHandler Activated<CoreWindow, WindowActivatedEventArgs>public abstract event TypedEventHandler Activated<CoreWindow, WindowActivatedEventArgs>Public MustInherit Event Activated<CoreWindow, WindowActivatedEventArgs>// This API is not available in Javascript.
AutomationProviderRequested AutomationProviderRequested AutomationProviderRequested AutomationProviderRequested
Specifies the event that is fired when a request for an automation handler is generated.
public : abstract event TypedEventHandler AutomationProviderRequested<CoreWindow, AutomationProviderRequestedEventArgs>public abstract event TypedEventHandler AutomationProviderRequested<CoreWindow, AutomationProviderRequestedEventArgs>Public MustInherit Event AutomationProviderRequested<CoreWindow, AutomationProviderRequestedEventArgs>// This API is not available in Javascript.
CharacterReceived CharacterReceived CharacterReceived CharacterReceived
Specifies the event that is fired when a new character is received by the input queue.
public : abstract event TypedEventHandler CharacterReceived<CoreWindow, CharacterReceivedEventArgs>public abstract event TypedEventHandler CharacterReceived<CoreWindow, CharacterReceivedEventArgs>Public MustInherit Event CharacterReceived<CoreWindow, CharacterReceivedEventArgs>// This API is not available in Javascript.
Closed Closed Closed Closed
Specifies the event that is fired when a window is closed (or the app terminates altogether).
public : abstract event TypedEventHandler Closed<CoreWindow, CoreWindowEventArgs>public abstract event TypedEventHandler Closed<CoreWindow, CoreWindowEventArgs>Public MustInherit Event Closed<CoreWindow, CoreWindowEventArgs>// This API is not available in Javascript.
InputEnabled InputEnabled InputEnabled InputEnabled
Specifies an event that occurs when input is enabled or disabled for the window.
public : abstract event TypedEventHandler InputEnabled<CoreWindow, InputEnabledEventArgs>public abstract event TypedEventHandler InputEnabled<CoreWindow, InputEnabledEventArgs>Public MustInherit Event InputEnabled<CoreWindow, InputEnabledEventArgs>// This API is not available in Javascript.
KeyDown KeyDown KeyDown KeyDown
Specifies the event that is fired when a non-system key is pressed down.
public : abstract event TypedEventHandler KeyDown<CoreWindow, KeyEventArgs>public abstract event TypedEventHandler KeyDown<CoreWindow, KeyEventArgs>Public MustInherit Event KeyDown<CoreWindow, KeyEventArgs>// This API is not available in Javascript.
KeyUp KeyUp KeyUp KeyUp
Specifies the event that is fired when a non-system key is released after a press.
public : abstract event TypedEventHandler KeyUp<CoreWindow, KeyEventArgs>public abstract event TypedEventHandler KeyUp<CoreWindow, KeyEventArgs>Public MustInherit Event KeyUp<CoreWindow, KeyEventArgs>// This API is not available in Javascript.
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.
public : abstract event TypedEventHandler PointerCaptureLost<CoreWindow, PointerEventArgs>public abstract event TypedEventHandler PointerCaptureLost<CoreWindow, PointerEventArgs>Public MustInherit Event PointerCaptureLost<CoreWindow, PointerEventArgs>// This API is not available in Javascript.
- See Also
PointerEntered PointerEntered PointerEntered PointerEntered
Specifies the event that occurs when a pointer moves into the bounding box of the window.
public : abstract event TypedEventHandler PointerEntered<CoreWindow, PointerEventArgs>public abstract event TypedEventHandler PointerEntered<CoreWindow, PointerEventArgs>Public MustInherit Event PointerEntered<CoreWindow, PointerEventArgs>// This API is not available in Javascript.
Remarks
For touch points this event will be raised before the PointerPressed event.
- See Also
PointerExited PointerExited PointerExited PointerExited
Specifies the event that occurs when the pointer moves outside the bounding box of the window.
public : abstract event TypedEventHandler PointerExited<CoreWindow, PointerEventArgs>public abstract event TypedEventHandler PointerExited<CoreWindow, PointerEventArgs>Public MustInherit Event PointerExited<CoreWindow, PointerEventArgs>// This API is not available in Javascript.
Remarks
For touch points this event will be raised before the PointerReleased event.
- See Also
PointerMoved PointerMoved PointerMoved PointerMoved
Specifies the event that occurs when a pointer moves within the bounding box of the window.
public : abstract event TypedEventHandler PointerMoved<CoreWindow, PointerEventArgs>public abstract event TypedEventHandler PointerMoved<CoreWindow, PointerEventArgs>Public MustInherit Event PointerMoved<CoreWindow, PointerEventArgs>// This API is not available in Javascript.
- See Also
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).
public : abstract event TypedEventHandler PointerPressed<CoreWindow, PointerEventArgs>public abstract event TypedEventHandler PointerPressed<CoreWindow, PointerEventArgs>Public MustInherit Event PointerPressed<CoreWindow, PointerEventArgs>// This API is not available in Javascript.
- See Also
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).
public : abstract event TypedEventHandler PointerReleased<CoreWindow, PointerEventArgs>public abstract event TypedEventHandler PointerReleased<CoreWindow, PointerEventArgs>Public MustInherit Event PointerReleased<CoreWindow, PointerEventArgs>// This API is not available in Javascript.
- See Also
PointerWheelChanged PointerWheelChanged PointerWheelChanged PointerWheelChanged
Specifies the event that occurs when the mouse wheel is rotated.
public : abstract event TypedEventHandler PointerWheelChanged<CoreWindow, PointerEventArgs>public abstract event TypedEventHandler PointerWheelChanged<CoreWindow, PointerEventArgs>Public MustInherit Event PointerWheelChanged<CoreWindow, PointerEventArgs>// This API is not available in Javascript.
- See Also
SizeChanged SizeChanged SizeChanged SizeChanged
Specifies the event that raises when the window size is changed.
public : abstract event TypedEventHandler SizeChanged<CoreWindow, WindowSizeChangedEventArgs>public abstract event TypedEventHandler SizeChanged<CoreWindow, WindowSizeChangedEventArgs>Public MustInherit Event SizeChanged<CoreWindow, WindowSizeChangedEventArgs>// This API is not available in Javascript.
Remarks
This event fires when the window size changes or when one of the following properties changes:
- AdjacentToLeftDisplayEdge
- AdjacentToRightDisplayEdge
- IsFullScreen You can use this event to listen for changes to the size or position of the current window.
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.
public : abstract event TypedEventHandler TouchHitTesting<CoreWindow, TouchHitTestingEventArgs>public abstract event TypedEventHandler TouchHitTesting<CoreWindow, TouchHitTestingEventArgs>Public MustInherit Event TouchHitTesting<CoreWindow, TouchHitTestingEventArgs>// This API is not available in Javascript.
VisibilityChanged VisibilityChanged VisibilityChanged VisibilityChanged
Specifies the event that occurs when the window visibility is changed.
public : abstract event TypedEventHandler VisibilityChanged<CoreWindow, VisibilityChangedEventArgs>public abstract event TypedEventHandler VisibilityChanged<CoreWindow, VisibilityChangedEventArgs>Public MustInherit Event VisibilityChanged<CoreWindow, VisibilityChangedEventArgs>// This API is not available in Javascript.