private void CreateAppButtonBottom() { _appButtonBottom = new ViewDrawRibbonAppButton(_ribbon, true) { ElementState = PaletteState.Pressed, Visible = _ribbon.RibbonShape != PaletteRibbonShape.Office2010 }; }
/// <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); }