Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GraphicsCache.Clear() Method

In This Article

Clears the internal hash tables that store the pens, fonts and, solid and linear gradient brushes that have recently been used.

Namespace: DevExpress.Utils.Drawing

Assembly: DevExpress.Utils.v24.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

#Declaration

public virtual void Clear()

#Remarks

The GraphicsCache class maintains internal collections of pens, fonts and brushes that have recently been used. The corresponding objects can be obtained from the collection and added to the collection using the methods provided by the GraphicsCache class (for instance, GraphicsCache.GetPen, GraphicsCache.GetFont, etc). The Clear method clears these collections. So after this method is called the GraphicsCache.GetPen and other methods will have to create new objects with the specified settings in corresponding collections.

See Also