System.Windows.Forms.CommandBarContextMenu.MenuBarItem.DrawBackground C# (CSharp) Method

DrawBackground() private method

private DrawBackground ( Graphics graphics, Rectangle rectangle, bool selected ) : void
graphics System.Drawing.Graphics
rectangle System.Drawing.Rectangle
selected bool
return void
            private void DrawBackground(Graphics graphics, Rectangle rectangle, bool selected)
            {
                Brush background = (selected) ? SystemBrushes.Highlight : SystemBrushes.Menu;
                graphics.FillRectangle(background, rectangle);
            }