// Token: 0x060026E6 RID: 9958 RVA: 0x000B848C File Offset: 0x000B668C
        protected override int GetSizeOfSetCore()
        {
            int num = base.GetSizeOfSetCore();

            if (num == -1)
            {
                GroupItem groupItem = (GroupItem)base.Owner;
                CollectionViewGroupInternal collectionViewGroupInternal = groupItem.GetValue(ItemContainerGenerator.ItemForItemContainerProperty) as CollectionViewGroupInternal;
                if (collectionViewGroupInternal != null)
                {
                    CollectionViewGroup parent = collectionViewGroupInternal.Parent;
                    if (parent != null)
                    {
                        num = parent.Items.Count;
                    }
                }
            }
            return(num);
        }
        /// <summary>
        /// Gets the size of a set that contains this GroupItem.
        /// </summary>
        /// <remarks>
        /// Gets the CollectionViewGroupInternal linked to this groupItem via ItemForItemContainerProperty,
        /// this collection describes the elements belonging to this GroupItem, we need the collection this
        /// GroupItem belongs to, so we look one level up using Parent.
        /// </remarks>
        override protected int GetSizeOfSetCore()
        {
            int sizeOfSet = base.GetSizeOfSetCore();

            if (sizeOfSet == AutomationProperties.AutomationSizeOfSetDefault)
            {
                GroupItem groupItem = (GroupItem)Owner;
                CollectionViewGroupInternal group = groupItem.GetValue(ItemContainerGenerator.ItemForItemContainerProperty) as CollectionViewGroupInternal;
                if (group != null)
                {
                    CollectionViewGroup parent = group.Parent;
                    if (parent != null)
                    {
                        sizeOfSet = parent.Items.Count;
                    }
                }
            }

            return(sizeOfSet);
        }
        /// <summary>
        /// Gets the position of this GroupItem within a set.
        /// </summary>
        /// <remarks>
        /// Gets the CollectionViewGroupInternal linked to this groupItem via ItemForItemContainerProperty,
        /// this collection describes the elements belonging to this GroupItem, we need the collection this
        /// GroupItem belongs to, so we look one level up using Parent.
        /// </remarks>
        override protected int GetPositionInSetCore()
        {
            int positionInSet = base.GetPositionInSetCore();

            if (positionInSet == AutomationProperties.AutomationPositionInSetDefault)
            {
                GroupItem groupItem = (GroupItem)Owner;
                CollectionViewGroupInternal group = groupItem.GetValue(ItemContainerGenerator.ItemForItemContainerProperty) as CollectionViewGroupInternal;
                if (group != null)
                {
                    CollectionViewGroup parent = group.Parent;
                    if (parent != null)
                    {
                        positionInSet = parent.Items.IndexOf(group) + 1;
                    }
                }
            }

            return(positionInSet);
        }