Gets or sets user-defined data associated with this item.
Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming
SyntaxC#
Copy Code
|
|---|
public Object Tag { get; set; } |
Visual Basic
Copy Code
|
|---|
Public Property Tag As Object |
An instance of any class derived from System.Object.
RemarksThis property contains data that you define and is not used by the component in any way. You can associate with the item any value of a primitive data type, an object from the .NET class library or a custom class.
If the tag is a value of primitive type, it is serialized directly by the component along with item containing it when saving / loading the diagram. Reference types are serialized using System.Xml.Serialization.XmlSerializer when saving diagrams to XML, or using System.Text.Json.JsonSerializer when saving to JSON.
You can implement custom serialization code using .NET XML API by handling SerializeTag and DeserializeTag events, or Json API using JsonSerializeTag and JsonDeserializeTag events
See Also