GraphLinksModelNodeData

StockSharp.Xaml.Diagram.GXDiagram.Model

A simple representation of node data for GraphLinksModel that supports property change notification, copying, and undo via the INotifyPropertyChanged, ICloneable, and IChangeDataValue interfaces.

Implements: INotifyPropertyChanged, IChangeDataValue, ICloneable

Constructors

GraphLinksModelNodeData
public GraphLinksModelNodeData()
graphLinksModelNodeData = GraphLinksModelNodeData()

The default constructor produces an empty object.

GraphLinksModelNodeData
public GraphLinksModelNodeData(NodeKey key)
graphLinksModelNodeData = GraphLinksModelNodeData(key)

This constructor also initializes the Key property.

key

Properties

Category
public string Category { get; set; }
value = graphLinksModelNodeData.Category
graphLinksModelNodeData.Category = value

Gets or sets a String that names the category to which the node data belongs.

IsLinkLabel
public bool IsLinkLabel { get; set; }
value = graphLinksModelNodeData.IsLinkLabel
graphLinksModelNodeData.IsLinkLabel = value

Gets or sets whether this node data represents a "label" on a link instead of a simple node.

IsSubGraph
public virtual bool IsSubGraph { get; set; }
value = graphLinksModelNodeData.IsSubGraph
graphLinksModelNodeData.IsSubGraph = value

Gets or sets whether this node data represents a group or "subgraph" instead of a normal "atomic" node.

IsSubGraphExpanded
public bool IsSubGraphExpanded { get; set; }
value = graphLinksModelNodeData.IsSubGraphExpanded
graphLinksModelNodeData.IsSubGraphExpanded = value

Gets or sets whether this node is in the "expanded" state.

Key
public NodeKey Key { get; set; }
value = graphLinksModelNodeData.Key
graphLinksModelNodeData.Key = value

Gets or sets the key property for this node data.

Location
public Point Location { get; set; }
value = graphLinksModelNodeData.Location
graphLinksModelNodeData.Location = value

Gets or sets a Point that is the location of the node in model coordinates.

MemberKeys
public IList<NodeKey> MemberKeys { get; set; }
value = graphLinksModelNodeData.MemberKeys
graphLinksModelNodeData.MemberKeys = value

Gets or sets a list of references to member nodes.

SubGraphKey
public NodeKey SubGraphKey { get; set; }
value = graphLinksModelNodeData.SubGraphKey
graphLinksModelNodeData.SubGraphKey = value

Gets or sets a reference to the containing subgraph node, if any.

Text
public string Text { get; set; }
value = graphLinksModelNodeData.Text
graphLinksModelNodeData.Text = value

Gets or sets a String that is associated with the node.

WasSubGraphExpanded
public bool WasSubGraphExpanded { get; set; }
value = graphLinksModelNodeData.WasSubGraphExpanded
graphLinksModelNodeData.WasSubGraphExpanded = value

Gets or sets whether this node had been "expanded" when its containing group was "collapsed".

Methods

ChangeDataValue
public virtual void ChangeDataValue(ModelChangedEventArgs e, bool undo)
graphLinksModelNodeData.ChangeDataValue(e, undo)

This method implements the IChangeDataValue interface, used to perform state changes for undo and redo.

e
an edit describing the change to be performed
undo
true if undoing; false if redoing
Clone
public virtual object Clone()
result = graphLinksModelNodeData.Clone()

Create a copy of this data; this implements the ICloneable interface.

ConvertNodeKeyToString
protected virtual string ConvertNodeKeyToString(NodeKey key)
result = graphLinksModelNodeData.ConvertNodeKeyToString(key)

Convert a key value to a string.

key

Returns: a String from which String) can recover the original key value

ConvertStringToNodeKey
protected virtual NodeKey ConvertStringToNodeKey(string s)
result = graphLinksModelNodeData.ConvertStringToNodeKey(s)

Convert a string to a key value.

s

Returns: a

LoadFromXElement
public virtual void LoadFromXElement(XElement e)
graphLinksModelNodeData.LoadFromXElement(e)

Initialize this node data with data held in a Linq for XML XElement.

e
the XElement
MakeXElement
public virtual XElement MakeXElement(XName n)
result = graphLinksModelNodeData.MakeXElement(n)

Constructs a Linq for XML XElement holding the data of this node.

n
the name of the new XElement

Returns: an initialized XElement

OnPropertyChanged
public virtual void OnPropertyChanged(ModelChangedEventArgs e)
graphLinksModelNodeData.OnPropertyChanged(e)

Raise the PropertyChanged event.

e
RaisePropertyChanged
protected void RaisePropertyChanged(string pname, object oldval, object newval)
graphLinksModelNodeData.RaisePropertyChanged(pname, oldval, newval)

Call this method from property setters to raise the PropertyChanged event.

pname
the property name
oldval
the value before the property was set
newval
the new value
ToString
public override string ToString()
result = graphLinksModelNodeData.ToString()

For debugging, use the Key property as this object's default text rendering.

Events

PropertyChanged
public event PropertyChangedEventHandler PropertyChanged
graphLinksModelNodeData.PropertyChanged += handler

This event implements the INotifyPropertyChanged interface, so that both the model and the dependency object system can be informed of changes to property values.