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

DrawText() private method

private DrawText ( System.Windows.Forms.TextGraphics textGraphics, string text, Point point, bool selected, bool disabled ) : void
textGraphics System.Windows.Forms.TextGraphics
text string
point Point
selected bool
disabled bool
return void
            private void DrawText(TextGraphics textGraphics, string text, Point point, bool selected, bool disabled)
            {
                Color color = (disabled ? (selected ? SystemColors.GrayText : SystemColors.ControlDark) : (selected ? SystemColors.HighlightText : SystemColors.MenuText));

                if ((!this.IsFlatMenu) && (disabled) && (!selected))
                {
                    textGraphics.DrawText(text, new Point(point.X + 1, point.Y + 1), font, SystemColors.ControlLightLight);
                }

                textGraphics.DrawText(text, point, font, color);
            }