windowsforms-devexpress-dot-utils-dot-appearanceobject-dot-fillrectangle-x28-devexpress-dot-utils-dot-drawing-dot-graphicscache-system-dot-drawing-dot-rectangle-x29.md
Fills the interior of a rectangle specified by a Rectangle structure.
Namespace : DevExpress.Utils
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
public void FillRectangle(
GraphicsCache cache,
Rectangle bounds
)
Public Sub FillRectangle(
cache As GraphicsCache,
bounds As Rectangle
)
| Name | Type | Description |
|---|---|---|
| cache | GraphicsCache |
A GraphicsCache object providing storage for the pens, fonts and brushes used during painting.
| | bounds | Rectangle |
A Rectangle value representing the drawing area.
|
This method calls the AppearanceObject.DrawBackground method to fill the specified drawing area.
The following code snippets (auto-collected from DevExpress Examples) contain references to the FillRectangle(GraphicsCache, Rectangle) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-grid-print-custom-draw-content/CS/MyXtraGrid/Form1.cs#L36
e.Appearance.BackColor = Color.Yellow;
e.Appearance.FillRectangle(e.Cache, e.Bounds);
Rectangle rect = e.Bounds;
{
e.Appearance.FillRectangle(e.Cache, e.Bounds);
e.Painter.DrawObject(e.Info);
winforms-grid-highlight-cell-values-matching-text-in-autofilterrow/CS/CarsGridWinApp15/Main.cs#L37
return;
e.Appearance.FillRectangle(e.Cache, e.Bounds);
e.Cache.Paint.DrawMultiColorString(e.Cache, e.Bounds, e.DisplayText, filterCellText, e.Appearance, Color.Black, Color.Gold, false, filterTextIndex);
winforms-grid-draw-thick-border-abound-focused-cell/CS/Form1.cs#L131
public static void DoDefaultDrawCell(GridView view, RowCellCustomDrawEventArgs e) {
e.Appearance.FillRectangle(e.Cache, e.Bounds);
((IViewController)view.GridControl).EditorHelper.DrawCellEdit(new GridViewDrawArgs(e.Cache, (view.GetViewInfo() as GridViewInfo), e.Bounds), (e.Cell as GridCellInfo).Editor, (e.Cell as GridCellInfo).ViewInfo, e.Appearance, (e.Cell as GridCellInfo).CellValueRect.Location);
winforms-grid-multiple-row-selection-web-style-checkboxes/CS/E1271/CheckMarkSelection.cs#L240
info.GroupText = " " + info.GroupText.TrimStart();
e.Appearance.FillRectangle(e.Cache, e.Bounds);
e.Painter.DrawObject(e.Info);
winforms-grid-print-custom-draw-content/VB/MyXtraGrid/Form1.vb#L36
e.Appearance.BackColor = Color.Yellow
e.Appearance.FillRectangle(e.Cache, e.Bounds)
Dim rect As Rectangle = e.Bounds
Private Sub DrawGroupRow(ByVal e As DevExpress.XtraGrid.Views.Base.RowObjectCustomDrawEventArgs)
e.Appearance.FillRectangle(e.Cache, e.Bounds)
e.Painter.DrawObject(e.Info)
winforms-grid-highlight-cell-values-matching-text-in-autofilterrow/VB/CarsGridWinApp15/Main.vb#L28
If filterTextIndex = -1 Then Return
e.Appearance.FillRectangle(e.Cache, e.Bounds)
e.Cache.Paint.DrawMultiColorString(e.Cache, e.Bounds, e.DisplayText, filterCellText, e.Appearance, Color.Black, Color.Gold, False, filterTextIndex)
winforms-grid-draw-thick-border-abound-focused-cell/VB/Form1.vb#L135
Public Shared Sub DoDefaultDrawCell(ByVal view As GridView, ByVal e As RowCellCustomDrawEventArgs)
e.Appearance.FillRectangle(e.Cache, e.Bounds)
CType(view.GridControl, IViewController).EditorHelper.DrawCellEdit(New GridViewDrawArgs(e.Cache, (TryCast(view.GetViewInfo(), GridViewInfo)), e.Bounds), (TryCast(e.Cell, GridCellInfo)).Editor, (TryCast(e.Cell, GridCellInfo)).ViewInfo, e.Appearance, (TryCast(e.Cell, GridCellInfo)).CellValueRect.Location)
winforms-grid-multiple-row-selection-web-style-checkboxes/VB/E1271/CheckMarkSelection.vb#L281
info.GroupText = " " & info.GroupText.TrimStart()
e.Appearance.FillRectangle(e.Cache, e.Bounds)
e.Painter.DrawObject(e.Info)
See Also