Skip to main content
A newer version of this page is available. .

GraphicsCache.GetSolidBrush(Color) Method

Gets a solid brush with specified parameters.

Namespace: DevExpress.Utils.Drawing

Assembly: DevExpress.Utils.v21.1.dll

NuGet Packages: DevExpress.Utils, DevExpress.Win.Design, DevExpress.Wpf.Core

Declaration

public Brush GetSolidBrush(
    Color color
)

Parameters

Name Type Description
color Color

A System.Drawing.Color object specifying the brush color.

Returns

Type Description
Brush

A System.Drawing.Brush descendant representing the requested brush (typically a System.Drawing.SolidBrush object).

Remarks

When the GetSolidBrush method is called, it checks whether the requested brush is already contained in an internal hash table of solid brushes. If so, the found brush is returned. Otherwise a new brush with specified parameters is created and added to an internal hash table. The hash table is initially empty. The introduced technique allows you to provide quick access to recently used solid brushes.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetSolidBrush(Color) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also