internal void UpdateSizes(PageContext pageContext)
        {
            PaddItemSizes paddItemSizes = m_renderItemSize as PaddItemSizes;

            if (paddItemSizes != null)
            {
                if (pageContext != null)
                {
                    m_pageItem.ItemRenderSizes = pageContext.GetSharedRenderItemSizesElement(paddItemSizes, isPadded: true, returnPaddings: true);
                }
                else
                {
                    m_pageItem.ItemRenderSizes = new PaddItemSizes(paddItemSizes);
                }
            }
            else if (pageContext != null)
            {
                m_pageItem.ItemRenderSizes = pageContext.GetSharedRenderItemSizesElement(m_renderItemSize, isPadded: false, returnPaddings: false);
            }
            else
            {
                m_pageItem.ItemRenderSizes = new ItemSizes(m_renderItemSize);
            }
        }
Exemple #2
0
 private void CalculateHiddenItemRenderSize(PageContext pageContext, bool createForRepeat)
 {
     if (m_itemRenderSizes != null)
     {
         return;
     }
     if (pageContext != null)
     {
         if (createForRepeat)
         {
             m_itemRenderSizes = pageContext.GetSharedRenderFromRepeatItemSizesElement(m_itemPageSizes, isPadded: true, returnPaddings: false);
         }
         else
         {
             m_itemRenderSizes = pageContext.GetSharedRenderItemSizesElement(m_itemPageSizes, isPadded: true, returnPaddings: false);
         }
     }
     if (m_itemRenderSizes == null)
     {
         m_itemRenderSizes = new ItemSizes(m_itemPageSizes);
     }
 }