A newer version of this page is available. Switch to the current version.

DiagramControl.CustomGetEditableItemPropertiesCacheKey Event

Allows you to update the set of properties displayed by the property grid.

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v19.1.dll


public event EventHandler<DiagramCustomGetEditableItemPropertiesCacheKeyEventArgs> CustomGetEditableItemPropertiesCacheKey

Event Data

The CustomGetEditableItemPropertiesCacheKey event's data class is DevExpress.XtraDiagram.DiagramCustomGetEditableItemPropertiesCacheKeyEventArgs.


The DiagramControl caches a set of editable properties for each diagram item type. These properties are displayed by the property grid when an end-user selects an item.

If you want to display different sets of a diagram item’s properties depending on certain condition, you can handle the CustomGetEditableItemPropertiesCacheKey event.

The following example demonstrates a custom shape that derives from the DiagramShape. When the ShowInfo property value is set to true, the property grid displays the Info property.

public class DiagramShapeEx : DiagramShape {
    //the NotifyParentProperty attribute is used to notify the DiagramControl
    //that the ShowInfo value has changed.
    public bool ShowInfo {
    public string Info {


If you have a reasonable number of shapes on the canvas, you can set the e.CacheKey to null without affecting the performance.

See Also