AppearanceObject.GetForeBrush(GraphicsCache) Method

Gets the solid brush whose color is specified by the AppearanceObject.ForeColor property.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v20.1.dll

Declaration

public Brush GetForeBrush(
    GraphicsCache cache
)
Public Function GetForeBrush(
    cache As GraphicsCache
) As Brush

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 a brush specified by the appearance object's settings.

Remarks

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

Use the AppearanceOptions.UseForeColor to obtain the foreground color specified by the appearance object's settings.

See Also