Class GraphLinksModel<TNodeData, TNodeKey, TSharedData, TLinkData, TLinkKey, TPort>.NodeData
- Namespace
- Northwoods.Go.Models
- Assembly
- Northwoods.GoDiagram.WinForms.dll
A simple representation of node data that supports property copying
via the ICloneable
interface.
public class GraphLinksModel<TNodeData, TNodeKey, TSharedData, TLinkData, TLinkKey, TPort>.NodeData : Model<TNodeData, TNodeKey, TSharedData>.NodeData, ICloneable
- Inheritance
-
GraphLinksModel<TNodeData, TNodeKey, TSharedData, TLinkData, TLinkKey, TPort>.NodeData
- Implements
- Inherited Members
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 { }
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.
Properties
Group
Gets or sets the containing group key for this node data.
public virtual TNodeKey Group { get; set; }
Property Value
- TNodeKey
IsGroup
Gets or sets whether this node data represents a group.
public virtual bool IsGroup { get; set; }
Property Value
IsSubGraphExpanded
Gets or sets whether this node data's subgraph is expanded.
public virtual bool IsSubGraphExpanded { get; set; }
Property Value
Remarks
The default value is true.
WasSubGraphExpanded
Gets or sets whether this node data's subgraph was expanded.
public virtual bool WasSubGraphExpanded { get; set; }