コード例 #1
0
 /// <summary>
 /// Override this method in a derived table view source class to react to changes in a list if it implements INotifyCollectionChanged (e.g. an ObservableCollection)
 /// </summary>
 /// <param name="sender">The ObservableCollection that was changed</param>
 /// <param name="e">See http://blog.stephencleary.com/2009/07/interpreting-notifycollectionchangedeve.html for details</param>
 protected virtual void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (!ignoreCollectionChanged)
     {
         tableView.ReloadData();                 // QC TODO: Check if this should & can be optimized, see for details documentation at http://blog.stephencleary.com/2009/07/interpreting-notifycollectionchangedeve.html
     }
     if (viewExtensionPoints != null)
     {
         viewExtensionPoints.OnCollectionChanged(sender, e);
     }
 }
コード例 #2
0
 /// <summary>
 /// Override this method in a derived adapter class to react to changes in a list if it implements INotifyCollectionChanged (e.g. an ObservableCollection)
 /// </summary>
 /// <param name="sender">The ObservableCollection that was changed</param>
 /// <param name="e">See http://blog.stephencleary.com/2009/07/interpreting-notifycollectionchangedeve.html for details</param>
 protected virtual void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     ApplicationBase.RunOnUIThread(() =>
     {
         NotifyDataSetChanged();
         // MQC TODO: Check if this should & can be optimized, see for details documentation at http://blog.stephencleary.com/2009/07/interpreting-notifycollectionchangedeve.html
         if (viewExtensionPoints != null)
         {
             viewExtensionPoints.OnCollectionChanged(sender, e);
         }
     });
 }