SystemBrushes Class
Collapse the table of content
Expand the table of content

SystemBrushes Class

 

Each property of the SystemBrushes class is a SolidBrush that is the color of a Windows display element.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

System.Object
  System.Drawing.SystemBrushes

public sealed class SystemBrushes

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticActiveBorder

Gets a SolidBrush that is the color of the active window's border.

System_CAPS_pubpropertySystem_CAPS_staticActiveCaption

Gets a SolidBrush that is the color of the background of the active window's title bar.

System_CAPS_pubpropertySystem_CAPS_staticActiveCaptionText

Gets a SolidBrush that is the color of the text in the active window's title bar.

System_CAPS_pubpropertySystem_CAPS_staticAppWorkspace

Gets a SolidBrush that is the color of the application workspace.

System_CAPS_pubpropertySystem_CAPS_staticButtonFace

Gets a SolidBrush that is the face color of a 3-D element.

System_CAPS_pubpropertySystem_CAPS_staticButtonHighlight

Gets a SolidBrush that is the highlight color of a 3-D element.

System_CAPS_pubpropertySystem_CAPS_staticButtonShadow

Gets a SolidBrush that is the shadow color of a 3-D element.

System_CAPS_pubpropertySystem_CAPS_staticControl

Gets a SolidBrush that is the face color of a 3-D element.

System_CAPS_pubpropertySystem_CAPS_staticControlDark

Gets a SolidBrush that is the shadow color of a 3-D element.

System_CAPS_pubpropertySystem_CAPS_staticControlDarkDark

Gets a SolidBrush that is the dark shadow color of a 3-D element.

System_CAPS_pubpropertySystem_CAPS_staticControlLight

Gets a SolidBrush that is the light color of a 3-D element.

System_CAPS_pubpropertySystem_CAPS_staticControlLightLight

Gets a SolidBrush that is the highlight color of a 3-D element.

System_CAPS_pubpropertySystem_CAPS_staticControlText

Gets a SolidBrush that is the color of text in a 3-D element.

System_CAPS_pubpropertySystem_CAPS_staticDesktop

Gets a SolidBrush that is the color of the desktop.

System_CAPS_pubpropertySystem_CAPS_staticGradientActiveCaption

Gets a SolidBrush that is the lightest color in the color gradient of an active window's title bar.

System_CAPS_pubpropertySystem_CAPS_staticGradientInactiveCaption

Gets a SolidBrush that is the lightest color in the color gradient of an inactive window's title bar.

System_CAPS_pubpropertySystem_CAPS_staticGrayText

Gets a SolidBrush that is the color of dimmed text.

System_CAPS_pubpropertySystem_CAPS_staticHighlight

Gets a SolidBrush that is the color of the background of selected items.

System_CAPS_pubpropertySystem_CAPS_staticHighlightText

Gets a SolidBrush that is the color of the text of selected items.

System_CAPS_pubpropertySystem_CAPS_staticHotTrack

Gets a SolidBrush that is the color used to designate a hot-tracked item.

System_CAPS_pubpropertySystem_CAPS_staticInactiveBorder

Gets a SolidBrush that is the color of an inactive window's border.

System_CAPS_pubpropertySystem_CAPS_staticInactiveCaption

Gets a SolidBrush that is the color of the background of an inactive window's title bar.

System_CAPS_pubpropertySystem_CAPS_staticInactiveCaptionText

Gets a SolidBrush that is the color of the text in an inactive window's title bar.

System_CAPS_pubpropertySystem_CAPS_staticInfo

Gets a SolidBrush that is the color of the background of a ToolTip.

System_CAPS_pubpropertySystem_CAPS_staticInfoText

Gets a SolidBrush that is the color of the text of a ToolTip.

System_CAPS_pubpropertySystem_CAPS_staticMenu

Gets a SolidBrush that is the color of a menu's background.

System_CAPS_pubpropertySystem_CAPS_staticMenuBar

Gets a SolidBrush that is the color of the background of a menu bar.

System_CAPS_pubpropertySystem_CAPS_staticMenuHighlight

Gets a SolidBrush that is the color used to highlight menu items when the menu appears as a flat menu.

System_CAPS_pubpropertySystem_CAPS_staticMenuText

Gets a SolidBrush that is the color of a menu's text.

System_CAPS_pubpropertySystem_CAPS_staticScrollBar

Gets a SolidBrush that is the color of the background of a scroll bar.

System_CAPS_pubpropertySystem_CAPS_staticWindow

Gets a SolidBrush that is the color of the background in the client area of a window.

System_CAPS_pubpropertySystem_CAPS_staticWindowFrame

Gets a SolidBrush that is the color of a window frame.

System_CAPS_pubpropertySystem_CAPS_staticWindowText

Gets a SolidBrush that is the color of the text in the client area of a window.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticFromSystemColor(Color)

Creates a Brush from the specified Color structure.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The following code example shows how to set a keyboard shortcut using the HotkeyPrefix property. It also demonstrates how to use the FromSystemColor method. To run this example, paste the code into a form, handle the form's Paint event and call the following method, passing e as PaintEventArgs.

private void ShowHotKey(PaintEventArgs e)
{

    // Declare the string with a keyboard shortcut.
    string text = "&Click Here";

    // Declare a new StringFormat.
    StringFormat format = new StringFormat();

    // Set the HotkeyPrefix property.
    format.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show;

    // Draw the string.
    Brush theBrush = 
        SystemBrushes.FromSystemColor(SystemColors.Highlight);

    e.Graphics.DrawString(text, this.Font, theBrush, 30, 40, format);
}

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft