Пример #1
0
        // PopUpの初期化
        protected void SetPopupItem(PanelItem popInfo)
        {
            PopPanel.PopUpMode = true;
            PopPanel.SetBorderStyleFromSettings();

            UpdatePopupPosition(popInfo);

            Popup.Width = Math.Max(popInfo.Width, PopWidth) + PopPanel.WidthMarginRight;
            if (popInfo.TopPos < scroll.ContentVerticalOffset)
            {
                Popup.MinHeight = Math.Max(0, popInfo.BottomPos - scroll.ContentVerticalOffset);
            }
            else
            {
                Popup.MinHeight = Math.Max(0, Math.Min(scroll.ContentVerticalOffset + scroll.ViewportHeight - popInfo.TopPos - PopPanel.HeightMarginBottom, popInfo.Height));
            }

            PopPanel.Item        = Activator.CreateInstance(popInfo.GetType(), popInfo.Data) as PanelItem;
            PopPanel.Item.Width  = Popup.Width - PopPanel.WidthMarginRight;
            PopPanel.Item.Height = Math.Max(PopPanel.GetMaxRenderHeight(9999), Popup.MinHeight);
            Popup.Height         = PopPanel.Item.Height + PopPanel.HeightMarginBottom;
            SetPopupItemEx(popInfo);

            UpdatePopupReDraw();
        }
Пример #2
0
 protected virtual void SetPopPanel(PanelItem popInfo)
 {
     PopPanel.PopUpMode = true;
     PopPanel.SetBorderStyleFromSettings();
     PopPanel.Item        = Activator.CreateInstance(popInfo.GetType(), popInfo.Data) as PanelItem;
     PopPanel.Item.Width  = PopWidth - PopPanel.WidthMarginRight;
     PopPanel.Item.Height = Math.Max(PopPanel.GetMaxRenderHeight(9999), Popup.MinHeight);
     Popup.Height         = PopPanel.Item.Height + PopPanel.HeightMarginBottom;
     UpdatePopupReDraw();
 }