diff options
Diffstat (limited to 'Xamarin.Forms.Core/TrackableCollection.cs')
-rw-r--r-- | Xamarin.Forms.Core/TrackableCollection.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/TrackableCollection.cs b/Xamarin.Forms.Core/TrackableCollection.cs new file mode 100644 index 00000000..959007ad --- /dev/null +++ b/Xamarin.Forms.Core/TrackableCollection.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.ObjectModel; + +namespace Xamarin.Forms +{ + internal class TrackableCollection<T> : ObservableCollection<T> + { + public event EventHandler Clearing; + + protected override void ClearItems() + { + Clearing?.Invoke(this, EventArgs.Empty); + base.ClearItems(); + } + } +}
\ No newline at end of file |