GraphicsCache.GetGradientBrush(Rectangle, Color, Color, LinearGradientMode, Int32) Method
Returns a linear gradient brush with the 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,
int blendCount
)
#Parameters
Name | Type | Description |
---|---|---|
rect | Rectangle | A Rectangle structure that specifies the endpoints of the linear gradient. The starting point is the upper-left corner of the rectangle, and the endpoint is the upper-right corner of the rectangle. |
start |
Color | A Color object that represents the starting color for the gradient. |
end |
Color | A Color object that represents the ending color for the gradient. |
mode | Linear |
A Linear |
blend |
Int32 | An integer value specifying the number of blend patterns for the brush. |
#Returns
Type | Description |
---|---|
Brush | A Brush descendant representing the requested linear gradient brush (typically 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 brush found is returned. Otherwise a new brush with the specified parameters is created and added to an internal hash table, initially the hash table is empty. This gives you the ability to quickly access recently used linear gradient brushes.