DiagramControl.CustomGetSerializableItemProperties Event
In This Article
Allows you to modify the list of serializable properties of diagram items.
Namespace: DevExpress.XtraDiagram
Assembly: DevExpress.XtraDiagram.v24.2.dll
NuGet Package: DevExpress.Win.Diagram
#Declaration
[DiagramCategory(DiagramCategory.DiagramItems)]
public event EventHandler<DiagramCustomGetSerializableItemPropertiesEventArgs> CustomGetSerializableItemProperties
#Event Data
The CustomGetSerializableItemProperties event's data class is DiagramCustomGetSerializableItemPropertiesEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Item |
Returns the serialized item type. |
Properties | Returns the collection of serializable properties. |
Serialization |
Indicates the context of serialization. |
The event data class exposes the following methods:
Method | Description |
---|---|
Create |
Allows you to create a custom property descriptor. |
Create |
Allows you to create a custom property descriptor. |
#Remarks
The event’s Properties member provides access to the collection of serializable item properties.
The example below illustrates how to exclude the Content property from serialization.
private void diagramControl1_CustomGetSerializableItemProperties(object sender, DevExpress.XtraDiagram.DiagramCustomGetSerializableItemPropertiesEventArgs e) {
if (e.ItemType == typeof(DiagramShape))
e.Properties.Remove(e.Properties["Content"]);
}
See Also