次の方法で共有


Device.BeginInvokeOnMainThread(Action) Method

Definition

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";
});

Applies to