CoreDispatcher
CoreDispatcher
CoreDispatcher
CoreDispatcher
Class
Definition
Provides the Windows Runtime core event message dispatcher. Instances of this type are responsible for processing the window messages and dispatching the events to the client.
public : sealed class CoreDispatcher : ICoreAcceleratorKeys, ICoreDispatcher, ICoreDispatcher2, ICoreDispatcherWithTaskPriority
struct winrt::Windows::UI::Core::CoreDispatcher : ICoreAcceleratorKeys, ICoreDispatcher, ICoreDispatcher2, ICoreDispatcherWithTaskPriority
public sealed class CoreDispatcher : ICoreAcceleratorKeys, ICoreDispatcher, ICoreDispatcher2, ICoreDispatcherWithTaskPriority
Public NotInheritable Class CoreDispatcher Implements ICoreAcceleratorKeys, ICoreDispatcher, ICoreDispatcher2, ICoreDispatcherWithTaskPriority
- Attributes
Device family |
Windows 10 (introduced v10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
Instances of this type can be obtained from the CoreWindow.Dispatcher property. The current CoreWindow instance can be obtained by calling CoreWindow.GetForCurrentThread.
void MyCoreWindowEvents::Run() // this is an implementation of IFrameworkView::Run() used to show context. It is called by CoreApplication::Run().
{
CoreWindow::GetForCurrentThread()->Activate();
/...
CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessUntilQuit);
}
Properties
CurrentPriority CurrentPriority CurrentPriority CurrentPriority |
Gets and sets the priority of the current task. |
HasThreadAccess HasThreadAccess HasThreadAccess HasThreadAccess |
Gets a value that specifies whether the event dispatcher provided by this instance of CoreWindow has access to the current thread or not. |
Methods
Events
AcceleratorKeyActivated AcceleratorKeyActivated AcceleratorKeyActivated AcceleratorKeyActivated |
Fired when an accelerator key is activated (pressed or held down). |