Exemplo n.º 1
0
        /// <summary>
        /// Shows this Popup on the specified location of the screen
        /// </summary>
        /// <param name="screenLocation"></param>
        public void Show(Point screenLocation)
        {
            ToolStripControlHost host = new ToolStripControlHost(this);

            WrappedDropDown           = new RibbonWrappedDropDown();
            WrappedDropDown.AutoClose = RibbonDesigner.Current != null;
            WrappedDropDown.Items.Add(host);

            WrappedDropDown.Padding = Padding.Empty;
            WrappedDropDown.Margin  = Padding.Empty;
            host.Padding            = Padding.Empty;
            host.Margin             = Padding.Empty;

            WrappedDropDown.Opening += new CancelEventHandler(ToolStripDropDown_Opening);
            WrappedDropDown.Closing += new ToolStripDropDownClosingEventHandler(ToolStripDropDown_Closing);
            WrappedDropDown.Closed  += new ToolStripDropDownClosedEventHandler(ToolStripDropDown_Closed);
            WrappedDropDown.Size     = Size;
            WrappedDropDown.Show(screenLocation);
            RibbonPopupManager.Register(this);

            OnShowed(EventArgs.Empty);
        }