Class TreeModel<TNodeData, TNodeKey, TSharedData>.NodeData
A simple representation of node data that supports property copying
via the ICloneable
interface.
Inheritance
Model<TNodeData, TNodeKey, TSharedData>.NodeData
TreeModel<TNodeData, TNodeKey, TSharedData>.NodeData
Implements
Namespace: Northwoods.Go.Models
Assembly: Northwoods.GoDiagram.WinForms.dll
Syntax
public class TreeModel<TNodeData, TNodeKey, TSharedData>.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 : TreeModel<BasicNodeData, string, object> { } public class BasicNodeData : BasicModel.NodeData { public string Color { get; set; } }
Properties
Parent
The parent key for this node data.
Declaration
public virtual TNodeKey Parent { get; set; }
Property Value
Type | Description |
---|---|
TNodeKey |