Skip to main content

AppearanceObject.GetBackBrush(GraphicsCache) Method

Gets the solid brush used to draw the element’s background.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v24.1.dll

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

Declaration

public Brush GetBackBrush(
    GraphicsCache cache
)

Parameters

Name Type Description
cache GraphicsCache

A GraphicsCache object that provides access to the pens and brushes used for painting.

Returns

Type Description
Brush

A Brush descendant representing the brush specified by the appearance object’s settings.

Remarks

If the cache parameter’s value is not a null reference, the GetBackBrush method uses the GraphicsCache object to obtain the solid brush whose color is specified by the background color settings of the current appearance object. This lets you obtain the brush quicker as it may already be stored within a cache. Otherwise, a new System.Drawing.SolidBrush object with appropriate settings is created and returned.

Use the AppearanceObject.GetBackColor method to obtain the background color specified by the appearance object’s settings.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetBackBrush(GraphicsCache) 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