Namespace: Northwoods.Go.Models
Assembly: Northwoods.GoDiagram.Avalonia.dll
Syntax
Properties
Gets or sets the name of the format of the diagram data.
Declaration
string DataFormat { get; set; }
Property Value
IsReadOnly
Gets or sets whether this model may be modified, such as adding nodes.
Declaration
bool IsReadOnly { get; set; }
Property Value
See Also
Name
Gets or sets the name of this model.
Declaration
string Name { get; set; }
Property Value
See Also
NodeDataSource
Gets or sets the collection of node data objects that correspond to Nodes,
Groups, or non-Link Parts in the Diagram.
Declaration
IEnumerable<object> NodeDataSource { get; set; }
Property Value
See Also
NodeKeyProperty
Gets or sets the name of the data property that returns a unique key for each node data object.
Declaration
string NodeKeyProperty { get; set; }
Property Value
See Also
SharedData
Gets an object that can hold programmer-defined property values for the model as a whole,
rather than just for one node or one link.
Declaration
object SharedData { get; set; }
Property Value
See Also
SkipsUndoManager
Declaration
bool SkipsUndoManager { get; set; }
Property Value
See Also
UndoManager
Declaration
UndoManager UndoManager { get; set; }
Property Value
See Also
Methods
AddNodeData(object)
When you want to add a node or group to the diagram,
call this method with a new data object.
Declaration
void AddNodeData(object nodedata)
Parameters
Type |
Name |
Description |
object |
nodedata |
|
See Also
ApplyIncrementalJson(string)
Declaration
void ApplyIncrementalJson(string s)
Parameters
Type |
Name |
Description |
string |
s |
|
See Also
Clear()
Clear out all references to any model data.
Declaration
See Also
Commit(Action<IModel>, string)
Starts a new transaction, calls the provided function, and commits the transaction.
Declaration
void Commit(Action<IModel> func, string tname = "")
Parameters
See Also
CommitTransaction(string)
Commit the changes of the current transaction.
Declaration
bool CommitTransaction(string tname)
Parameters
Type |
Name |
Description |
string |
tname |
|
Returns
See Also
ContainsNodeData(object)
Decide if a given node data object is in this model, using reference equality.
Declaration
bool ContainsNodeData(object nodedata)
Parameters
Type |
Name |
Description |
object |
nodedata |
|
Returns
See Also
CopyNodeData(object)
Make a copy of a node data object.
Declaration
object CopyNodeData(object nodedata)
Parameters
Type |
Name |
Description |
object |
nodedata |
|
Returns
See Also
FindNodeDataForKey(object)
Given a key, find the node data object in this model
that uses the given value as its unique key.
Declaration
object FindNodeDataForKey(object key)
Parameters
Type |
Name |
Description |
object |
key |
|
Returns
See Also
GetCategoryForNodeData(object)
Find the category of a given node data, a string naming the node template
or group template or part template
that the Diagram should use to represent the node data.
Declaration
string GetCategoryForNodeData(object nodedata)
Parameters
Type |
Name |
Description |
object |
nodedata |
|
Returns
See Also
GetKeyForNodeData(object)
Given a node data object return its unique key.
Declaration
object GetKeyForNodeData(object nodedata)
Parameters
Type |
Name |
Description |
object |
nodedata |
|
Returns
See Also
InsertListItem(IList, int, object)
Add an item to a data list that may be data bound by a Panel as its ItemList,
given a new data value and the index at which to insert the new value, in a manner that can be undone/redone and that automatically updates any bindings.
Declaration
void InsertListItem(IList list, int idx, object val)
Parameters
See Also
RemoveListItem(IList, int)
Remove an item from a data list that may be data bound by a Panel as its ItemList,
given the index at which to remove a data value, in a manner that can be undone/redone and that automatically updates any bindings.
Declaration
void RemoveListItem(IList list, int idx = -1)
Parameters
Type |
Name |
Description |
IList |
list |
|
int |
idx |
|
See Also
RemoveNodeData(object)
When you want to remove a node or group from the diagram,
call this method with an existing data object.
Declaration
void RemoveNodeData(object nodedata)
Parameters
Type |
Name |
Description |
object |
nodedata |
|
See Also
RollbackTransaction()
Rollback the current transaction, undoing any recorded changes.
Declaration
bool RollbackTransaction()
Returns
See Also
Set(object, string, object)
Change the value of some property of a node data, a link data, an item data, or the SharedData,
given a string naming the property and the new value,
in a manner that can be undone/redone and that automatically updates any bindings.
Declaration
void Set(object data, string propname, object val)
Parameters
See Also
SetCategoryForNodeData(object, string)
Change the category of a given node data, a string naming the node template
or group template or part template
that the Diagram should use to represent the node data.
Declaration
void SetCategoryForNodeData(object nodedata, string cat)
Parameters
See Also
SetKeyForNodeData(object, object)
Change the unique key of a given node data that is already in this model.
Declaration
void SetKeyForNodeData(object nodedata, object key)
Parameters
See Also
StartTransaction(string)
Declaration
bool StartTransaction(string tname)
Parameters
Type |
Name |
Description |
string |
tname |
|
Returns
See Also
ToIncrementalJson(ChangedEvent)
Produce a JSON-format string representing the changes in the most recent Transaction.
Declaration
string ToIncrementalJson(ChangedEvent e)
Parameters
Returns
See Also
ToJson()
Generate a string representation of the persistent data in this model, in JSON format,
that can be read in later with a call to FromJson<T>(string).
Declaration
Returns
See Also
Events
Changed
Register or unregister an event handler that is called when there is a ChangedEvent.
Declaration
event EventHandler<ChangedEvent> Changed
Event Type
See Also