Class TreeModel<TNodeData, TNodeKey, TSharedData>.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 TreeModel<TNodeData, TNodeKey, TSharedData>.NodeData : Model<TNodeData, TNodeKey, TSharedData>.NodeData, ICloneable
- Inheritance
-
TreeModel<TNodeData, TNodeKey, TSharedData>.NodeData
- Implements
- Inherited Members
Examples
public class BasicModel : TreeModel<BasicNodeData, string, object> { } public class BasicNodeData : BasicModel.NodeData { public string Color { get; set; } }
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
Parent
The parent key for this node data.
public virtual TNodeKey Parent { get; set; }
Property Value
- TNodeKey