public int GetElementIndex(VirtualizationInfo virtInfo) { if (virtInfo == null) { throw new ArgumentException("Element is not a child of this ItemsRepeater."); } return(virtInfo.IsRealized || virtInfo.IsInUniqueIdResetPool ? virtInfo.Index : -1); }
private void UpdateElementIndex(IControl element, VirtualizationInfo virtInfo, int index) { var oldIndex = virtInfo.Index; if (oldIndex != index) { virtInfo.UpdateIndex(index); _owner.OnElementIndexChanged(element, oldIndex, index); } }
private bool ClearElementToUniqueIdResetPool(IControl element, VirtualizationInfo virtInfo) { if (_isDataSourceStableResetPending) { _resetPool.Add(element); virtInfo.MoveOwnershipToUniqueIdResetPoolFromLayout(); } return(_isDataSourceStableResetPending); }
public int GetElementIndex(VirtualizationInfo virtInfo) { if (virtInfo == null) { //Element is not a child of this ItemsRepeater. return(-1); } return(virtInfo.IsRealized || virtInfo.IsInUniqueIdResetPool ? virtInfo.Index : -1); }
private bool ClearElementToPinnedPool(IControl element, VirtualizationInfo virtInfo, bool isClearedDueToCollectionChange) { bool moveToPinnedPool = !isClearedDueToCollectionChange && virtInfo.IsPinned; if (moveToPinnedPool) { _pinnedPool.Add(new PinnedElementInfo(element)); virtInfo.MoveOwnershipToPinnedPool(); } return(moveToPinnedPool); }