Search
DiagramItem Class
Remarks See Also
 






Represents an item in the diagram document. All classes representing diagram elements derive from DiagramItem.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public abstract class DiagramItem : BindableObject

Visual Basic  Copy Code

Public MustInherit Class DiagramItem
    Inherits BindableObject

 Remarks

All items in the diagram document links and nodes  share common base class called DiagramItem. Its main function is to provide interface for the most common methods and properties of every diagram element.

MindFusion.Diagramming for .NET MAUI invokes the Draw method when an item must be drawn on screen. You can call Draw if you need to draw an item on your own graphics surface. Override the method when implementing custom item types to provide your own rendering functionality. The standard item types draw their interior and borders using the objects assigned to the Brush and Pen properties. The font of the item's text is set by the Font property.

The order in which items are painted from bottom to top is called the z-order. Moving items up or down the z-order can be done by means of the ZBottom, ZTop, ZLevelUp and ZLevelDown methods. Accessing and setting the index of an item in the z-order can be done using the ZIndex property.

Every item can cast a shadow, whose offset from the item is specified by the ShadowOffsetX and ShadowOffsetY properties. The shadow is painted using the color set in ShadowBrush.

An application can associate custom data with an item by means of the Tag property. The tags are only meant to hold data related to the entities represented by the chart items. They are not used or modified by MindFusion.Diagramming for .NET MAUI in any way. The tags are saved and loaded together with the diagram elements when serializing the document to a disk file or a stream.

Items can be locked for interactive modification through the Locked property. Locked items can still be modified programmatically. Items can also be marked as locked for automatic layout methods through the IgnoreLayout property.

 Inheritance Hierarchy

System.Object
    Microsoft.Maui.Controls.BindableObject
        MindFusion.Diagramming.DiagramItem
            MindFusion.Diagramming.DiagramLink
            MindFusion.Diagramming.DiagramNode
            MindFusion.Diagramming.Selection

 See Also