protected virtual void DetermineContentHorizontalSize(PageContext pageContext, double leftInParentSystem, double rightInParentSystem, List <PageItem> ancestors, bool anyAncestorHasKT, bool hasUnpinnedAncestors, bool resolveState, bool resolveItem) { double num = 0.0; double leftInParentSystem2 = Math.Max(0.0, leftInParentSystem - base.ItemPageSizes.Left); double rightInParentSystem2 = rightInParentSystem - base.ItemPageSizes.Left; bool flag = true; for (int i = 0; i < m_children.Length; i++) { PageItem pageItem = m_children[m_indexesLeftToRight[i]]; if (pageItem != null) { if (resolveState) { pageItem.ResolveHorizontal(pageContext, leftInParentSystem2, rightInParentSystem2, m_children, resolveItem); } else { pageItem.CalculateHorizontal(pageContext, leftInParentSystem2, rightInParentSystem2, m_children, ancestors, ref anyAncestorHasKT, hasUnpinnedAncestors); } if (pageItem.KTHIsUnresolved) { base.UnresolvedCKTH = true; } if (pageItem.NeedResolve) { base.NeedResolve = true; } num = Math.Max(num, pageItem.ItemPageSizes.Right); if (!(pageItem is HiddenPageItem)) { flag = false; } } } if (num > 0.0) { StretchHorizontal(num, pageContext); } else if (!flag && base.ItemPageSizes.Left >= leftInParentSystem) { StretchHorizontal(num, pageContext); } PageItem[] children = m_children; foreach (PageItem pageItem2 in children) { if (pageItem2 != null) { pageItem2.ItemPageSizes.DeltaX = 0.0; } } }