AppearanceObject.GetBorderPen(GraphicsCache, Int32) Method
Gets the pen used to draw the element’s borders.
Namespace: DevExpress.Utils
Assembly: DevExpress.Utils.v24.1.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
cache | GraphicsCache | A GraphicsCache object that provides access to the pens and brushes used for painting. |
width | Int32 | An Int32 value that specifies the width of the returned Pen. |
Returns
Type | Description |
---|---|
Pen | A Pen object that is the pen specified by the appearance object’s settings. |
Remarks
If the cache parameter’s value is not a null reference, the GetBorderPen method uses the GraphicsCache object to obtain the pen whose color is specified by the border color settings of the current appearance object. This lets you obtain the pen more quickly, as it may already be stored within the cache. Otherwise, a new System.Drawing.Pen 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.