Device.BeginInvokeOnMainThread(Action) 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.
Invokes an Action on the device main (UI) thread.
public static void BeginInvokeOnMainThread (Action action);
static member BeginInvokeOnMainThread : Action -> unit
Parameters
- action
- System.Action
The Action to invoke
Remarks
This example shows how to set the Text of Label on the main thread, e.g. in response to an async event.
Device.BeginInvokeOnMainThread (() => {
label.Text = "Async operation completed";
});