-api-id | -api-type |
---|---|
M:Windows.UI.Core.CoreDispatcher.ProcessEvents(Windows.UI.Core.CoreProcessEventsOption) |
winrt method |
Starts the dispatcher processing the input event queue for this instance of CoreWindow.
Determines how many events to process, and if this method should block.
Call this method to dispatch events from your view provider's main app loop defined in the IFrameworkView.Run method. If your window is visible, call it with CoreProcessEventsOption.ProcessAllIfPresent to dispatch current events and continue. If your window is not visible, use CoreProcessEventsOption.ProcessOneAndAllPending to block until the next event and prevent busy waiting.
If you are using another app model, such as XAML or JavaScript, you do not need to call this method. To avoid reentrancy scenarios in your UWP app using C++, C#, or Visual Basic with XAML, use the types and methods in the provided XAML namespaces, which call this method in the appropriate context.
This method fails if called recursively. When it fails, call RoOriginateError to obtain the error and the message supplied to an attached debugger.