void OnCollectionViewUpdated(NotifyCollectionChangedEventArgs args) { Device.BeginInvokeOnMainThread(() => { CollectionViewUpdated?.Invoke(this, args); }); }
void OnCollectionViewUpdated(NotifyCollectionChangedEventArgs args) { if (!ApplicationModel.MainThread.IsMainThread) { ApplicationModel.MainThread.BeginInvokeOnMainThread(() => CollectionViewUpdated?.Invoke(this, args)); } else { CollectionViewUpdated?.Invoke(this, args); } }