Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

AppearanceObject.GetBorderBrush(GraphicsCache) Method

Gets the brush used to draw the element’s border.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v24.2.dll

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

#Declaration

public Brush GetBorderBrush(
    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 a brush specified by the appearance object’s settings.

#Remarks

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

Use the AppearanceObject.GetBorderColor method to obtain the border color specified by the appearance object’s settings.

See Also