Posts

Showing posts with the label ui

[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: 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... });