Draws the border around the quick access toolbar.
Inheritance: ComponentFactory.Krypton.Toolkit.ViewComposite
Exemplo n.º 1
0
        /// <summary>
        /// Initialize a new instance of the ViewLayoutRibbonQATMini class.
        /// </summary>
        /// <param name="ribbon">Owning control instance.</param>
        /// <param name="needPaintDelegate">Delegate for notifying paint/layout changes.</param>
        public ViewLayoutRibbonQATMini(KryptonRibbon ribbon,
                                       NeedPaintHandler needPaintDelegate)
        {
            Debug.Assert(ribbon != null);
            _ribbon = ribbon;

            // Create the minibar border suitable for a caption area
            _border = new ViewDrawRibbonQATBorder(ribbon, needPaintDelegate, true);

            // Create minibar content that synchs with ribbon collection
            _borderContents = new ViewLayoutRibbonQATFromRibbon(ribbon, needPaintDelegate, false);
            _border.Add(_borderContents);

            // Separator gap before the extra button
            _extraSeparator = new ViewLayoutSeparator(SEP_GAP);

            // Need the extra button to show after the border area
            _extraButton = new ViewDrawRibbonQATExtraButtonMini(ribbon, needPaintDelegate);
            _extraButton.ClickAndFinish += new ClickAndFinishHandler(OnExtraButtonClick);

            // Add layout contents
            Add(_border, ViewDockStyle.Fill);
            Add(_extraSeparator, ViewDockStyle.Right);
            Add(_extraButton, ViewDockStyle.Right);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initialize a new instance of the ViewLayoutRibbonQATMini class.
        /// </summary>
        /// <param name="ribbon">Owning control instance.</param>
        /// <param name="needPaintDelegate">Delegate for notifying paint/layout changes.</param>
        public ViewLayoutRibbonQATMini(KryptonRibbon ribbon,
                                       NeedPaintHandler needPaintDelegate)
        {
            Debug.Assert(ribbon != null);
            _ribbon = ribbon;

            // Create the minibar border suitable for a caption area
            _border = new ViewDrawRibbonQATBorder(ribbon, needPaintDelegate, true);

            // Create minibar content that synchs with ribbon collection
            _borderContents = new ViewLayoutRibbonQATFromRibbon(ribbon, needPaintDelegate, false);
            _border.Add(_borderContents);

            // Separator gap before the extra button
            _extraSeparator = new ViewLayoutSeparator(SEP_GAP);

            // Need the extra button to show after the border area
            _extraButton = new ViewDrawRibbonQATExtraButtonMini(ribbon, needPaintDelegate);
            _extraButton.ClickAndFinish += new ClickAndFinishHandler(OnExtraButtonClick);

            // Add layout contents
            Add(_border, ViewDockStyle.Fill);
            Add(_extraSeparator, ViewDockStyle.Right);
            Add(_extraButton, ViewDockStyle.Right);
        }