[TIP] "Dispatcher.BeginInvoke()" in Xamarin.Forms
In traditional WP8 apps, when you want to update a visual element but you are not in the UI thread, you have to use the dispatcher like this:
In Xamarin.Forms, you have to use the Device's object static method:
Deployment.Current.Dispatcher.BeginInvoke( /* my custom task */);
In Xamarin.Forms, you have to use the Device's object static method:
Device.BeginInvokeOnMainThread(() => { // your code on UI thread here... });
Comments
Post a Comment