ShowCalculatingSize() public method

Show the group popup relative to the parent group instance.
public ShowCalculatingSize ( ViewDrawRibbonGroup parentGroup, Rectangle parentScreenRect ) : void
parentGroup ViewDrawRibbonGroup Parent group instance.
parentScreenRect System.Drawing.Rectangle Screen rectangle of the parent.
return void
Example #1
0
        private void OnCollapsedClick(object sender, MouseEventArgs e)
        {
            // We do not operate the collapsed button at design time
            if (!_ribbon.InDesignMode)
            {
                // We are pressed until the popup window is removed
                _pressed = true;
                _container.Refresh();

                // Create the popup window for the group
                _popupGroup = new VisualPopupGroup(_ribbon, _ribbonGroup, _ribbon.Renderer);

                // We need to know when disposed so the pressed state can be reversed
                _popupGroup.Disposed += new EventHandler(OnVisualPopupGroupDisposed);

                // Ask the popup to show itself relative to ourself
                _popupGroup.ShowCalculatingSize(this, _container.RectangleToScreen(ClientRectangle));
            }
        }
        private void OnCollapsedClick(object sender, MouseEventArgs e)
        {
            // We do not operate the collapsed button at design time
            if (!_ribbon.InDesignMode)
            {
                // We are pressed until the popup window is removed
                _pressed = true;
                _container.Refresh();

                // Create the popup window for the group
                _popupGroup = new VisualPopupGroup(_ribbon, _ribbonGroup, _ribbon.Renderer);

                // We need to know when disposed so the pressed state can be reversed
                _popupGroup.Disposed += new EventHandler(OnVisualPopupGroupDisposed);

                // Ask the popup to show itself relative to ourself
                _popupGroup.ShowCalculatingSize(this, _container.RectangleToScreen(ClientRectangle));
            }
        }