Device.InvokeOnMainThreadAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| InvokeOnMainThreadAsync(Action) |
Invokes an Action on the device main (UI) thread. |
| InvokeOnMainThreadAsync(Func<Task>) |
Invokes a Func on the device main (UI) thread. |
| InvokeOnMainThreadAsync<T>(Func<T>) |
Invokes a Func on the device main (UI) thread. |
| InvokeOnMainThreadAsync<T>(Func<Task<T>>) |
Invokes a Func on the device main (UI) thread. |
InvokeOnMainThreadAsync(Action)
InvokeOnMainThreadAsync(Func<Task>)
Invokes a Func on the device main (UI) thread.
public static System.Threading.Tasks.Task InvokeOnMainThreadAsync (Func<System.Threading.Tasks.Task> funcTask);
static member InvokeOnMainThreadAsync : Func<System.Threading.Tasks.Task> -> System.Threading.Tasks.Task
Parameters
Returns
Applies to
InvokeOnMainThreadAsync<T>(Func<T>)
Invokes a Func on the device main (UI) thread.
public static System.Threading.Tasks.Task<T> InvokeOnMainThreadAsync<T> (Func<T> func);
static member InvokeOnMainThreadAsync : Func<'T> -> System.Threading.Tasks.Task<'T>
Type Parameters
- T
The return type of the Func.
Parameters
- func
- Func<T>
The Func to invoke.
Returns
- Task<T>
Applies to
InvokeOnMainThreadAsync<T>(Func<Task<T>>)
Invokes a Func on the device main (UI) thread.
public static System.Threading.Tasks.Task<T> InvokeOnMainThreadAsync<T> (Func<System.Threading.Tasks.Task<T>> funcTask);
static member InvokeOnMainThreadAsync : Func<System.Threading.Tasks.Task<'T>> -> System.Threading.Tasks.Task<'T>
Type Parameters
- T
The return type of the Func.
Parameters
Returns
- Task<T>