public virtual void OnModelChanged( ModelChangedEventArgs e )
Parameters
- e
- the Northwoods.GoXam.Model.ModelChangedEventArgs.Change property gives a basic description of the change to the model
public virtual void OnModelChanged( ModelChangedEventArgs e )
The implementation of this method and the methods that it calls should not modify the model.
Property changes to the model itself are conveyed by specific Northwoods.GoXam.Model.ModelChange values, not by the general Northwoods.GoXam.Model.ModelChange.Property case.
For small changes such as the addition or removal of node data from the model, this calls the AddNodeForData or RemoveNodeForData method.
For changes in link relationships in the model, this calls AddLinkForData(Object,IDiagramModel), AddLinkForData(Object,Object,IDiagramModel), RemoveLinkForData(Object,IDiagramModel), or RemoveLinkForData(Object,Object,IDiagramModel).
For more wholescale changes, such as a change in the Northwoods.GoXam.Model.IDiagramModel.NodesSource, this will call RebuildNodeElements to discard all existing nodes and links and reconstruct them using the appropriate (and perhaps changed) data templates. For widespread changes only involving links, this will call RebuildLinkElements.
This ignores property changes to model data, because those should be handled directly by data-bindings in the DataTemplate
elements. The only exception is when UpdatesRouteDataPoints is true and the PropertyName
is "Points".