void Move(NotifyCollectionChangedEventArgs args)
        {
            var count = args.NewItems.Count;

            if (count == 1)
            {
                // For a single item, we can use NotifyItemMoved and get the animation
                _notifier.NotifyItemMoved(this, AdjustPositionForHeader(args.OldStartingIndex), AdjustPositionForHeader(args.NewStartingIndex));
                return;
            }

            var start = AdjustPositionForHeader(Math.Min(args.OldStartingIndex, args.NewStartingIndex));
            var end   = AdjustPositionForHeader(Math.Max(args.OldStartingIndex, args.NewStartingIndex) + count);

            _notifier.NotifyItemRangeChanged(this, start, end);
        }
Пример #2
0
 public void NotifyItemRangeChanged(IItemSource group, int localStartIndex, int localEndIndex)
 {
     localStartIndex = GetAbsolutePosition(group, localStartIndex);
     localEndIndex   = GetAbsolutePosition(group, localEndIndex);
     notifier.NotifyItemRangeChanged(this, localStartIndex, localEndIndex);
 }