Back to Devexpress

DiagramCustomGetEditableItemPropertiesEventArgs.Item Property

wpf-devexpress-dot-xpf-dot-diagram-dot-diagramcustomgeteditableitempropertieseventargs.md

latest3.0 KB
Original Source

DiagramCustomGetEditableItemPropertiesEventArgs.Item Property

Returns the diagram item selected by the user.

Namespace : DevExpress.Xpf.Diagram

Assembly : DevExpress.Xpf.Diagram.v25.2.dll

NuGet Package : DevExpress.Wpf.Diagram

Declaration

csharp
public DiagramItem Item { get; }
vb
Public ReadOnly Property Item As DiagramItem

Property Value

TypeDescription
DiagramItem

A DevExpress.Xpf.Diagram.DiagramItem descendant.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Item 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.

wpf-diagram-create-diagramshape-descendant-with-editable-and-serializable-properties/CS/DXDiagram.CustomShapeProperties/MainWindow.xaml.cs#L33

csharp
private void diagramControl_CustomGetEditableItemProperties(object sender, DiagramCustomGetEditableItemPropertiesEventArgs e) {
    if (e.Item is DiagramShapeEx) {
        e.Properties.Add(TypeDescriptor.GetProperties(typeof(DiagramShapeEx))["Description"]);

wpf-diagram-create-diagramshape-descendant-with-editable-and-serializable-properties/VB/DXDiagram.CustomShapeProperties/MainWindow.xaml.vb#L33

vb
Private Sub diagramControl_CustomGetEditableItemProperties(ByVal sender As Object, ByVal e As DiagramCustomGetEditableItemPropertiesEventArgs)
    If TypeOf e.Item Is DiagramShapeEx Then
        e.Properties.Add(TypeDescriptor.GetProperties(GetType(DiagramShapeEx))("Description"))

See Also

DiagramCustomGetEditableItemPropertiesEventArgs Class

DiagramCustomGetEditableItemPropertiesEventArgs Members

DevExpress.Xpf.Diagram Namespace