ComponentFactory.Krypton.Ribbon.ViewLayoutRibbonAppButton.ViewLayoutRibbonAppButton C# (CSharp) Method

ViewLayoutRibbonAppButton() public method

Initialize a new instance of the ViewLayoutRibbonAppButton class.
public ViewLayoutRibbonAppButton ( KryptonRibbon ribbon, bool bottomHalf ) : System
ribbon KryptonRibbon Owning control instance.
bottomHalf bool Scroller orientation.
return System
        public ViewLayoutRibbonAppButton(KryptonRibbon ribbon,
                                         bool bottomHalf)
        {
            Debug.Assert(ribbon != null);
            _ribbon = ribbon;

            _appButton = new ViewDrawRibbonAppButton(ribbon, bottomHalf);
            _separator = new ViewLayoutRibbonSeparator(APPBUTTON_GAP, true);

            // Dock it against the appropriate edge
            Add(_appButton, (bottomHalf ? ViewDockStyle.Top : ViewDockStyle.Bottom));

            // Place a separator between edge of control and start of the app button
            Add(_separator, ViewDockStyle.Left);

            // Use filler placeholder to force size to that required
            Add(new ViewLayoutRibbonSeparator(APPBUTTON_WIDTH, APPBUTTON_GAP, true), ViewDockStyle.Fill);
        }