示例#1
0
        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);
        }
示例#2
0
        private void UpdateElementIndex(IControl element, VirtualizationInfo virtInfo, int index)
        {
            var oldIndex = virtInfo.Index;

            if (oldIndex != index)
            {
                virtInfo.UpdateIndex(index);
                _owner.OnElementIndexChanged(element, oldIndex, index);
            }
        }
示例#3
0
        private bool ClearElementToUniqueIdResetPool(IControl element, VirtualizationInfo virtInfo)
        {
            if (_isDataSourceStableResetPending)
            {
                _resetPool.Add(element);
                virtInfo.MoveOwnershipToUniqueIdResetPoolFromLayout();
            }

            return(_isDataSourceStableResetPending);
        }
示例#4
0
        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);
        }
示例#5
0
        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);
        }