Device.BeginInvokeOnMainThread(Action) Método
Definición
Invoca una acción en el subproceso principal del dispositivo (UI).Invokes an Action on the device main (UI) thread.
public static void BeginInvokeOnMainThread (Action action);
static member BeginInvokeOnMainThread : Action -> unit
Parámetros
- action
- Action
Acción que se va a invocar.The Action to invoke
Comentarios
Este ejemplo muestra cómo establecer el texto de la etiqueta en el subproceso principal, por ejemplo, en respuesta a un evento Async.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";
});