internal RibbonPanelPopup(RibbonPanel panel)
        {
            DoubleBuffered = true;

            _sensor = new RibbonMouseSensor(this, panel.Owner, panel.Items);
            _sensor.PanelLimit = panel;
            _panel = panel;
            _panel.PopUp = this;
            panel.Owner.SuspendSensor();

            using (Graphics g = CreateGraphics())
            {
                panel.overflowBoundsBuffer = panel.Bounds;
                Size s = panel.SwitchToSize(this, g, GetSizeMode(panel));
                s.Width += 100;
                s.Height += 100;
                Size = s;
                
            }

            foreach (RibbonItem item in panel.Items)
            {
                item.SetCanvas(this);
            }
        } 
Example #2
0
        internal RibbonPanelPopup(RibbonPanel panel)
        {
            SetStyle(ControlStyles.Opaque, false);
            DoubleBuffered = true;

            Sensor = new RibbonMouseSensor(this, panel.Owner, panel.Items)
            {
                PanelLimit = panel
            };
            Panel       = panel;
            Panel.PopUp = this;
            panel.Owner.SuspendSensor();

            using (Graphics g = CreateGraphics())
            {
                panel.overflowBoundsBuffer = panel.Bounds;
                Size s = panel.SwitchToSize(this, g, GetSizeMode(panel));
                //s.Width += 100;
                //s.Height += 100;
                Size = s;
            }

            foreach (RibbonItem item in panel.Items)
            {
                item.SetCanvas(this);
            }
        }
Example #3
0
        internal RibbonPanelPopup(RibbonPanel panel)
        {
            DoubleBuffered = true;

            _sensor            = new RibbonMouseSensor(this, panel.Owner, panel.Items);
            _sensor.PanelLimit = panel;
            _panel             = panel;
            _panel.PopUp       = this;
            panel.Owner.SuspendSensor();

            using (Graphics g = CreateGraphics())
            {
                panel.overflowBoundsBuffer = panel.Bounds;
                Size s = panel.SwitchToSize(this, g, GetSizeMode(panel));
                Size = s;
            }

            foreach (RibbonItem item in panel.Items)
            {
                item.SetCanvas(this);
            }
        }