can only be invoked from the UI thread
狀況說明
ui使用非同步呼叫方法後,ui沒有被更新
處理方式
Device.BeginInvokeOnMainThread ( () => {
// interact with UI elements
});
This is the equivalent of InvokeOnMainThread on iOS, RunOnUiThread on Android, and Dispatcher.BeginInvoke on Windows Phone.
useful links
http://tirania.org/monomac/archive/2012/Sep-10.html https://developer.xamarin.com/guides/xamarin-forms/platform-features/device/