If you want to add a node to your diagram programmatically, don't call this method, but create a node data object and add it to the model's Northwoods.GoXam.Model.IDiagramModel.NodesSource, either directly to that collection or by calling Northwoods.GoXam.Model.IDiagramModel.AddNode. Remember to wrap all model changes in a transaction.
If the diagram already has a Node for the data, as determined by FindNodeForData, this method returns that node.
If FilterNodeForData is false, this method will do nothing and return null.
For bound data this calls FindCategoryForNode to determine the category string to pass to FindTemplateForNode in order to get the DataTemplate
. Once it has the category and the DataTemplate
, this calls MakeNodeForData to actually allocate and initialize the Node or Group.
If the nodedata is a Node and if the model is a Northwoods.GoXam.Model.PartsModel, this method doesn't need to construct a new node by calling MakeNodeForData, but can just add the node to the diagram, in the appropriate Layer determined by the LayerName.
The implementation of this method should not modify the model.