Beispiel #1
0
        /// <summary>
        /// Shows the popup on the screen.  This method can only be called once in the lifetime of this object.
        /// </summary>
        public void ShowPopup()
        {
            Form owner = GetRootForm(_popupOwner);

            _helper.AssignHandle(owner.Handle);
            _helper.ShowPopup(owner, this, _location);
        }
        /// <summary>
        /// Shows the active band in a popup when the bar is collapsed
        /// </summary>
        public void ShowCollapsedBandPopup()
        {
            if (Bar.ActiveBand != null)
            {
                popup          = new NaviBandPopup();
                popup.Content  = Bar.ActiveBand.ClientArea;
                popup.Renderer = renderer;

                popupHelper = new PopupWindowHelper();
                Form parent = Bar.FindForm();
                popupHelper.PopupClosed += new PopupClosedEventHandler(popupHelper_PopupClosed);

                popupHelper.AssignHandle(parent.Handle);
                popup.Resizable     = true;
                popup.ShowInTaskbar = false;
                popup.Height        = Bar.PopupHeight;
                popup.Width         = orgWidth;
                popup.RightToLeft   = Bar.RightToLeft;
                popup.MinimumSize   = new Size(Bar.PopupMinWidth, 30);

                if (Bar.RightToLeft == RightToLeft.Yes)
                {
                    popupHelper.ShowPopup(parent, popup, Bar.PointToScreen(new Point(0 - orgWidth, Bar.HeaderHeight)));
                }
                else
                {
                    popupHelper.ShowPopup(parent, popup, Bar.PointToScreen(new Point(Bar.Width, Bar.HeaderHeight)));
                }
            }
        }