private void CreateAppButtonBottom() { _appButtonBottom = new ViewDrawRibbonAppButton(_ribbon, true); _appButtonBottom.ElementState = PaletteState.Pressed; if (_ribbon.RibbonShape == PaletteRibbonShape.Office2010) { _appButtonBottom.Visible = false; } }
/// <summary> /// Initialize a new instance of the ViewLayoutRibbonAppButton class. /// </summary> /// <param name="ribbon">Owning control instance.</param> /// <param name="bottomHalf">Scroller orientation.</param> 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); }