Edit

Share via


DispatcherHelper Class

Definition

Caution

Replace calls to APIs in this class with extensions for the Windows.System.DispatcherQueue type (see https://docs.microsoft.com/uwp/api/windows.system.dispatcherqueue).

This class provides static methods helper for executing code in UI thread of the main window.

public static class DispatcherHelper
[System.Obsolete("Replace calls to APIs in this class with extensions for the Windows.System.DispatcherQueue type (see https://docs.microsoft.com/uwp/api/windows.system.dispatcherqueue).")]
public static class DispatcherHelper
type DispatcherHelper = class
[<System.Obsolete("Replace calls to APIs in this class with extensions for the Windows.System.DispatcherQueue type (see https://docs.microsoft.com/uwp/api/windows.system.dispatcherqueue).")>]
type DispatcherHelper = class
Public Module DispatcherHelper
Inheritance
DispatcherHelper
Attributes

Methods

AwaitableRunAsync(CoreDispatcher, Action, CoreDispatcherPriority)
Obsolete.

Extension method for Windows.UI.Core.CoreDispatcher. Offering an actual awaitable Task with optional result that will be executed on the given dispatcher.

AwaitableRunAsync(CoreDispatcher, Func<Task>, CoreDispatcherPriority)
Obsolete.

Extension method for Windows.UI.Core.CoreDispatcher. Offering an actual awaitable Task with optional result that will be executed on the given dispatcher.

AwaitableRunAsync<T>(CoreDispatcher, Func<T>, CoreDispatcherPriority)
Obsolete.

Extension method for Windows.UI.Core.CoreDispatcher. Offering an actual awaitable Task<TResult> with optional result that will be executed on the given dispatcher.

AwaitableRunAsync<T>(CoreDispatcher, Func<Task<T>>, CoreDispatcherPriority)
Obsolete.

Extension method for Windows.UI.Core.CoreDispatcher. Offering an actual awaitable Task<TResult> with optional result that will be executed on the given dispatcher.

ExecuteOnUIThreadAsync(Action, CoreDispatcherPriority)
Obsolete.

Executes the given function on the main view's UI thread.

ExecuteOnUIThreadAsync(CoreApplicationView, Action, CoreDispatcherPriority)
Obsolete.

Executes the given function on a given view's UI thread.

ExecuteOnUIThreadAsync(CoreApplicationView, Func<Task>, CoreDispatcherPriority)
Obsolete.

Executes the given function on a given view's UI thread.

ExecuteOnUIThreadAsync(Func<Task>, CoreDispatcherPriority)
Obsolete.

Executes the given Task-returning function on the main view's UI thread and returns either that Task or a proxy Task that completes when the one produced by the given function completes.

ExecuteOnUIThreadAsync<T>(CoreApplicationView, Func<T>, CoreDispatcherPriority)
Obsolete.

Executes the given function on a given view's UI thread.

ExecuteOnUIThreadAsync<T>(CoreApplicationView, Func<Task<T>>, CoreDispatcherPriority)
Obsolete.

Executes the given function on a given view's UI thread.

ExecuteOnUIThreadAsync<T>(Func<T>, CoreDispatcherPriority)
Obsolete.

Executes the given function on the main view's UI thread and returns its result.

ExecuteOnUIThreadAsync<T>(Func<Task<T>>, CoreDispatcherPriority)
Obsolete.

Executes the given Task<TResult>-returning function on the main view's UI thread and returns either that Task<TResult> or a proxy Task<TResult> that completes when the one produced by the given function completes.

Applies to