Exemplo n.º 1
0
 private void sortDescriptors_CollectionChanged(
     object sender,
     NotifyCollectionChangedEventArgs e)
 {
     this.resetReason = CollectionResetReason.SortingChanged;
     this.OnNotifyPropertyChanged("SortDescriptors");
 }
Exemplo n.º 2
0
 private void source_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Batch || e.Action == NotifyCollectionChangedAction.Reset)
     {
         this.resetReason = CollectionResetReason.Refresh;
     }
     this.ProcessCollectionChanged(e);
 }
Exemplo n.º 3
0
 protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "FilterExpression" || e.PropertyName == "Filter")
     {
         this.resetReason = CollectionResetReason.FilteringChanged;
     }
     if (this.PropertyChanged == null || this.update != 0)
     {
         return;
     }
     this.PropertyChanged((object)this, e);
 }
Exemplo n.º 4
0
        /// <summary>
        /// Raises the NotifyPropertyChanged event
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "FilterExpression" ||
                e.PropertyName == "Filter")
            {
                this.resetReason = CollectionResetReason.FilteringChanged;
            }

            if (this.PropertyChanged != null && this.update == 0)
            {
                this.PropertyChanged(this, e);
            }
        }
Exemplo n.º 5
0
 public virtual bool MoveToPage(int pageIndex)
 {
     if (!this.CanChangePage || pageIndex < 0 || (pageIndex == this.PageIndex || pageIndex >= this.TotalPages) || (pageIndex * this.PageSize >= this.ItemCount || this.OnPageChanging(pageIndex)))
     {
         return(false);
     }
     this.isPageChanging   = true;
     this.currentPageIndex = pageIndex;
     this.resetReason      = CollectionResetReason.PagingChanged;
     this.RefreshOverride();
     this.isPageChanging = false;
     this.OnPageChanged();
     return(true);
 }
Exemplo n.º 6
0
        protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
        {
            if (this.update == 0)
            {
                if (this.VersionUpdateNeeded(args))
                {
                    this.version++;
                }

                if (this.CollectionChanged != null)
                {
                    args.ResetReason = this.resetReason;
                    this.resetReason = CollectionResetReason.Refresh;
                    this.CollectionChanged(this, args);
                }
            }
        }
Exemplo n.º 7
0
 protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
 {
     if (this.update != 0)
     {
         return;
     }
     if (this.VersionUpdateNeeded(args))
     {
         ++this.version;
     }
     if (this.CollectionChanged == null)
     {
         return;
     }
     args.ResetReason = this.resetReason;
     this.resetReason = CollectionResetReason.Refresh;
     this.CollectionChanged((object)this, args);
 }