Пример #1
0
        private void RenderBorder(Graphics g, RibbonThemaSettingsBase settings, Rectangle itemBounds)
        {
            switch (this.dropDownOpening ? RibbonElementState.Pressed : this.State)
            {
            case RibbonElementState.Hot:
            {
                settings.DrawHotButtonBorder(g, itemBounds);
            }
            break;

            case RibbonElementState.Pressed:
            case RibbonElementState.Selected:
            {
                settings.DrawPressedButtonBorder(g, itemBounds);
            }
            break;
            }
        }
Пример #2
0
        private void RenderBorder(Graphics g, RibbonThemaSettingsBase settings, Rectangle itemBounds)
        {
            if (this.ButtonStyle == RibbonButtonStyle.SplitButton && this.BorderVisualState != VisualState.Normal)
            {
                settings.DrawHotButtonBorder(g, itemBounds);
            }
            switch (this.dropDownOpening ? VisualState.Pressed : this.PanelVisualState)
            {
            case VisualState.Hot:
            {
                settings.DrawHotButtonBorder(g, GetHotBoundsForRender(itemBounds));
            }
            break;

            case VisualState.Pressed:
            {
                settings.DrawPressedButtonBorder(g, GetHotBoundsForRender(itemBounds));
            }
            break;
            }
        }