Implemented interface member:
property
CurrentPosition
System.ComponentModel.ICollectionView.CurrentPosition
3 overrides of CurrentPosition
PresentationFramework (3)
src\Framework\MS\Internal\Data\CollectionViewProxy.cs (1)
204public override int CurrentPosition
src\Framework\MS\Internal\Data\EnumerableCollectionView.cs (1)
204public override int CurrentPosition
src\Framework\System\Windows\Controls\ItemCollection.cs (1)
819public override int CurrentPosition
116 references to CurrentPosition
PresentationFramework (116)
src\Framework\MS\Internal\Controls\InnerItemCollectionView.cs (13)
111bool changingCurrentItem = (CurrentPosition == index); 470if (position != CurrentPosition && OKToChangeCurrent()) 510int oldCurrentPosition = CurrentPosition; 573if (oldCurrentPosition != CurrentPosition) 646return (0 <= CurrentPosition && CurrentPosition < ViewCount); 792else if (index <= CurrentPosition) // adjust current index if insertion is earlier 794int newCurrentPosition = CurrentPosition + 1; 815if (index < CurrentPosition) 817int newCurrentPosition = CurrentPosition - 1; 821else if (index == CurrentPosition) 832int newPosition = (CurrentPosition < lastPosition) ? CurrentPosition : lastPosition;
src\Framework\MS\Internal\Data\CompositeCollectionView.cs (38)
271if (((CurrentPosition != lastPosition) || (CurrentItem != lastItem)) 300return _MoveTo(CurrentPosition + 1); 311return _MoveTo(CurrentPosition - 1); 330if (position != CurrentPosition || item != CurrentItem) 529if (startingIndex == CurrentPosition) 593if (oldStartingIndex == CurrentPosition) 597else if (newStartingIndex <= CurrentPosition && oldStartingIndex > CurrentPosition) 601else if (oldStartingIndex < CurrentPosition && newStartingIndex >= CurrentPosition) 781if (flatOldIndex == CurrentPosition) 934if ((CurrentPosition != index) && OKToChangeCurrent()) 938int oldCurrentPosition = CurrentPosition; 953if (oldCurrentPosition != CurrentPosition) 1111if (proposed != CurrentPosition || newCurrentItem != CurrentItem) 1119int oldCurrentPosition = CurrentPosition; 1142if (oldCurrentPosition != CurrentPosition) 1164flatIndex = CurrentPosition + 1; 1171flatIndex = CurrentPosition + 1; 1194flatIndex = CurrentPosition + 1; 1200flatIndex = CurrentPosition; 1207flatIndex = CurrentPosition + 1; 1225if (flatIndex <= CurrentPosition) 1227int newCurrentPosition = CurrentPosition + 1; 1255if (flatIndex < CurrentPosition) 1257SetCurrent(CurrentItem, CurrentPosition - 1); 1269else if (flatIndex == CurrentPosition) // current item was removed 1284if ((oldIndex < CurrentPosition && newIndex < CurrentPosition) 1285|| (oldIndex > CurrentPosition && newIndex > CurrentPosition)) 1288if (newIndex <= CurrentPosition) 1291if (oldIndex <= CurrentPosition) 1302int oldCurrentPosition = CurrentPosition; 1350if (oldCurrentPosition != CurrentPosition) 1363int oldCurrentPosition = CurrentPosition; 1380SetCurrent(newCurrentItem, CurrentPosition); 1393if (CurrentPosition != oldCurrentPosition)
src\Framework\MS\Internal\Data\EnumerableCollectionView.cs (1)
206get { return _view.CurrentPosition; }
src\Framework\System\Windows\Controls\ItemCollection.cs (1)
828return _collectionView.CurrentPosition;
src\Framework\System\Windows\Data\BindingListCollectionView.cs (25)
1299int oldCurrentPosition = IsEmpty ? 0 : CurrentPosition; 1423if (oldCurrentPosition != CurrentPosition) 1517int originalCurrentPosition = CurrentPosition; 1518int oldCurrentPosition = CurrentPosition; 1599bool currentPositionHasChanged = (CurrentPosition != oldCurrentPosition); 1606oldCurrentPosition = CurrentPosition; 1625if (CurrentPosition != oldCurrentPosition) 1628oldCurrentPosition = CurrentPosition; 1646currentPositionHasChanged = currentPositionHasChanged || (CurrentPosition != oldCurrentPosition); 1857get { return (0 <= CurrentPosition && CurrentPosition < InternalCount); } 1863if (proposed == CurrentPosition || IsEmpty) 2075else if (index <= CurrentPosition) // adjust current index if insertion is earlier 2077int newPosition = CurrentPosition + 1; 2095bool result = (index == CurrentPosition); 2098if (index < CurrentPosition) 2100SetCurrent(CurrentItem, CurrentPosition - 1); 2109if (oldIndex == CurrentPosition) 2114else if (oldIndex < CurrentPosition && CurrentPosition <= newIndex) 2118SetCurrent(CurrentItem, CurrentPosition - 1); 2120else if (newIndex <= CurrentPosition && CurrentPosition < oldIndex) 2124SetCurrent(CurrentItem, CurrentPosition + 1); 2133bool result = (index == CurrentPosition);
src\Framework\System\Windows\Data\CollectionView.cs (13)
462int index = CurrentPosition + 1; 493int index = CurrentPosition - 1; 568if ((position != CurrentPosition || !IsCurrentInSync) 894if (oldCurrentPosition != CurrentPosition) 1370return GetItemAt(CurrentPosition) == CurrentItem; 1757return (0 <= CurrentPosition && CurrentPosition < Count); 2063if ((oldIndex < CurrentPosition && newIndex < CurrentPosition) 2064|| (oldIndex > CurrentPosition && newIndex > CurrentPosition)) 2067if (oldIndex <= CurrentPosition) 2069else if (newIndex <= CurrentPosition)
src\Framework\System\Windows\Data\ListCollectionView.cs (25)
123int oldCurrentPosition = IsEmpty ? -1 : CurrentPosition; 179if (oldCurrentPosition != CurrentPosition) 214if (position != CurrentPosition || !IsCurrentInSync) 1894int originalCurrentPosition = CurrentPosition; 1895int oldCurrentPosition = CurrentPosition; 2104bool currentPositionHasChanged = (CurrentPosition != oldCurrentPosition); 2111oldCurrentPosition = CurrentPosition; 2134if (CurrentPosition != oldCurrentPosition) 2137oldCurrentPosition = CurrentPosition; 2156currentPositionHasChanged = currentPositionHasChanged || (CurrentPosition != oldCurrentPosition); 2502get { return (0 <= CurrentPosition && CurrentPosition < InternalCount); } 2842else if (index <= CurrentPosition) // adjust current index if insertion is earlier 2844int newPosition = CurrentPosition + 1; 2862if (index < CurrentPosition) 2864SetCurrent(CurrentItem, CurrentPosition - 1); 2867else if (index == CurrentPosition) 2876if (oldIndex == CurrentPosition) 2881else if (oldIndex < CurrentPosition && CurrentPosition <= newIndex) 2885SetCurrent(CurrentItem, CurrentPosition - 1); 2887else if (newIndex <= CurrentPosition && CurrentPosition < oldIndex) 2891SetCurrent(CurrentItem, CurrentPosition + 1); 2900if (index == CurrentPosition)