windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-customdraweventargs-31acb656.md
Provides methods to paint on drawing surfaces in GDI+ and DirectX modes. See DirectX hardware acceleration to learn more.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public GraphicsCache Cache { get; }
Public ReadOnly Property Cache As GraphicsCache
| Type | Description |
|---|---|
| GraphicsCache |
A GraphicsCache object.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Cache property.
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.
editViewInfo.CalcViewInfo(e.Graphics);
e.Cache.FillRectangle(viewInfo.PaintAppearance.Row.GetBackBrush(e.Cache), HotTrackRectangle);
groupEditPainter.Draw(new ControlGraphicsInfoArgs(editViewInfo, e.Cache, HotTrackRectangle));
winforms-grid-multiple-row-selection-web-style-checkboxes/CS/E1271/CheckMarkSelection.cs#L233
e.Painter.DrawObject(e.Info);
DrawCheckBox(e.Cache, e.Bounds, SelectedCount == _view.DataRowCount);
e.Handled = true;
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-keep-groups-expanded/CS/KeepGroupsExpanded/Form1.cs#L29
info.GroupText = " " + info.GroupText.TrimStart();
e.Cache.FillRectangle(e.Appearance.GetBackBrush(e.Cache), e.Bounds);
ObjectPainter.DrawObject(e.Cache, e.Painter, e.Info);
winforms-grid-show-editor-buttons-on-cell-hover/CS/WindowsApplication3/Form1.cs#L44
textRect.Offset(e.Bounds.X, e.Bounds.Y);
EditorButtonObjectInfoArgs args = new EditorButtonObjectInfoArgs(e.Cache, info.Item.Buttons[0], e.Appearance);
Rectangle minBounds = info.EditorButtonPainter.CalcObjectMinBounds(args);
editViewInfo.CalcViewInfo(e.Graphics)
e.Cache.FillRectangle(viewInfo.PaintAppearance.Row.GetBackBrush(e.Cache), HotTrackRectangle)
groupEditPainter.Draw(New ControlGraphicsInfoArgs(editViewInfo, e.Cache, HotTrackRectangle))
winforms-grid-multiple-row-selection-web-style-checkboxes/VB/E1271/CheckMarkSelection.vb#L273
e.Painter.DrawObject(e.Info)
DrawCheckBox(e.Cache, e.Bounds, SelectedCount = _view.DataRowCount)
e.Handled = True
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-keep-groups-expanded/VB/KeepGroupsExpanded/Form1.vb#L31
info.GroupText = " " & info.GroupText.TrimStart()
e.Cache.FillRectangle(e.Appearance.GetBackBrush(e.Cache), e.Bounds)
ObjectPainter.DrawObject(e.Cache, e.Painter, e.Info)
winforms-grid-show-editor-buttons-on-cell-hover/VB/WindowsApplication3/Form1.vb#L47
textRect.Offset(e.Bounds.X, e.Bounds.Y)
Dim args As New EditorButtonObjectInfoArgs(e.Cache, info.Item.Buttons(0), e.Appearance)
Dim minBounds As Rectangle = info.EditorButtonPainter.CalcObjectMinBounds(args)
See Also