コード例 #1
0
 private void Monitor()
 {
     if (listener != null)
     {
         listener.DeepCollectionChanged -= CollectionListener_DeepCollectionChanged;
         listener.Dispose();
         this.Children.Clear();
         listener = null;
     }
     if (this.BindingContext != null && string.IsNullOrEmpty(this.ItemsSourceSelector) == false)
     {
         listener = ChangeListener.Create(this.BindingContext, this.ItemsSourceSelector, this.propsToIgnoreList);
         listener.DeepCollectionChanged += CollectionListener_DeepCollectionChanged;
         if (this.BindingContext is INotifyPropertyChanged)
         {
             CollectionListener_DeepCollectionChanged(null, new DeepCollectionChangedEventArg(this.ItemsSourceSelector, this.BindingContext, null));
         }
         listener.Subscribe();
     }
 }