GraphicsCache.GetGradientBrush(Rectangle, Color, Color, LinearGradientMode) Method
Returns a linear gradient brush with specified settings.
Namespace: DevExpress.Utils.Drawing
Assembly: DevExpress.Utils.v24.2.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
#Declaration
public Brush GetGradientBrush(
Rectangle rect,
Color startColor,
Color endColor,
LinearGradientMode mode
)
#Parameters
Name | Type | Description |
---|---|---|
rect | Rectangle | A System. |
start |
Color | A System. |
end |
Color | A System. |
mode | Linear |
A System. |
#Returns
Type | Description |
---|---|
Brush | A System. |
#Remarks
When the GetGradientBrush method is called, it checks whether the requested brush is already contained in an internal hash table of linear gradient 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 linear gradient brushes.