コード例 #1
0
 void OnCollectionViewUpdated(NotifyCollectionChangedEventArgs args)
 {
     Device.BeginInvokeOnMainThread(() =>
     {
         CollectionViewUpdated?.Invoke(this, args);
     });
 }
コード例 #2
0
ファイル: ObservableItemsSource.cs プロジェクト: sung-su/maui
 void OnCollectionViewUpdated(NotifyCollectionChangedEventArgs args)
 {
     if (!ApplicationModel.MainThread.IsMainThread)
     {
         ApplicationModel.MainThread.BeginInvokeOnMainThread(() => CollectionViewUpdated?.Invoke(this, args));
     }
     else
     {
         CollectionViewUpdated?.Invoke(this, args);
     }
 }