private void DetermineContentVerticalSize(PageContext pageContext, double topInParentSystem, double bottomInParentSystem, List <PageItem> ancestors, ref bool anyAncestorHasKT, bool hasUnpinnedAncestors, bool resolveState, bool resolveItem)
        {
            double      num = 0.0;
            double      topInParentSystem2    = Math.Max(0.0, topInParentSystem - base.ItemPageSizes.Top);
            double      bottomInParentSystem2 = bottomInParentSystem - base.ItemPageSizes.Top;
            PageContext pageContext2          = pageContext;

            if (!pageContext.IgnorePageBreaks && base.IgnorePageBreaks)
            {
                pageContext2 = new PageContext(pageContext, pageContext.CacheNonSharedProps);
                pageContext2.IgnorePageBreaks       = true;
                pageContext2.IgnorePageBreaksReason = PageContext.IgnorePageBreakReason.ToggleableItem;
            }
            base.FullyCreated = true;
            for (int i = 0; i < m_children.Length; i++)
            {
                PageItem pageItem = m_children[i];
                if (pageItem != null)
                {
                    if (resolveState)
                    {
                        pageItem.ResolveVertical(pageContext2, topInParentSystem2, bottomInParentSystem2, m_children, resolveItem, pageContext.Common.CanOverwritePageBreak, pageContext.Common.CanSetPageName);
                    }
                    else
                    {
                        pageItem.CalculateVertical(pageContext2, topInParentSystem2, bottomInParentSystem2, m_children, ancestors, ref anyAncestorHasKT, hasUnpinnedAncestors);
                    }
                    if (pageItem.KTVIsUnresolved)
                    {
                        base.UnresolvedCKTV = true;
                    }
                    if (pageItem.PBAreUnresolved)
                    {
                        base.UnresolvedCPB = true;
                    }
                    if (pageItem.NeedResolve)
                    {
                        base.NeedResolve = true;
                    }
                    if (!pageItem.FullyCreated)
                    {
                        base.FullyCreated = false;
                    }
                    num = Math.Max(num, pageItem.ItemPageSizes.Bottom);
                }
            }
            if (pageContext.ConsumeWhitespace)
            {
                ConsumeWhitespaceVertical(base.ItemPageSizes, num + m_bottomPadding);
            }
            else
            {
                base.ItemPageSizes.AdjustHeightTo(num);
            }
            PageItem[] children = m_children;
            foreach (PageItem pageItem2 in children)
            {
                if (pageItem2 != null)
                {
                    pageItem2.ItemPageSizes.DeltaY = 0.0;
                }
            }
        }