Class GraphLinksModel<TNodeData, TNodeKey, TSharedData, TLinkData, TLinkKey, TPort>.NodeData

GoDiagram®
v10.0.11
by Northwoods Software®

A simple representation of node data that supports property copying via the ICloneable interface.

Inheritance
Model<TNodeData, TNodeKey, TSharedData>.NodeData
GraphLinksModel<TNodeData, TNodeKey, TSharedData, TLinkData, TLinkKey, TPort>.NodeData
Implements
Namespace: Northwoods.Go.Models
Assembly: Northwoods.GoDiagram.Avalonia.dll
Syntax
public class GraphLinksModel<TNodeData, TNodeKey, TSharedData, TLinkData, TLinkKey, TPort>.NodeData : Model<TNodeData, TNodeKey, TSharedData>.NodeData, ICloneable
Remarks

You should override the Clone() method if the fields contain data that should not be shared between copies.

Normally, each Key should have a unique value within the model. You can maintain that yourself, by setting the Key to unique values before adding the node data to the model's collection of nodes. Or you can ensure this by overriding the MakeNodeDataKeyUnique(TNodeData) method or providing a MakeUniqueKeyFunction function.

Examples

public class BasicModel : GraphLinksModel<BasicNodeData, string, object, BasicLinkData, string, string> { } public class BasicNodeData : BasicModel.NodeData { public string Color { get; set; } } public class BasicLinkData: BasicModel.LinkData { }

Properties

Group

Gets or sets the containing group key for this node data.

Declaration
public virtual TNodeKey Group { get; set; }
Property Value
Type Description
TNodeKey

IsGroup

Gets or sets whether this node data represents a group.

Declaration
public virtual bool IsGroup { get; set; }
Property Value
Type Description
bool

IsSubGraphExpanded

Gets or sets whether this node data's subgraph is expanded.

Declaration
public virtual bool IsSubGraphExpanded { get; set; }
Property Value
Type Description
bool
Remarks

The default value is true.

WasSubGraphExpanded

Gets or sets whether this node data's subgraph was expanded.

Declaration
public virtual bool WasSubGraphExpanded { get; set; }
Property Value
Type Description
bool

Implements