I am looking to make an interface that presents data in two forms:
a GoXam Dynamic Ports graph
a table (probably datagrid of some sort)
I would like to have them both show the same data and have each updated in realtime when one or the other is changed…
For example the datagrid would have a column that states where the link to the top port comes from. If it gets changed in the data grid view then the GoXam graph will immediately update. and similarly, if the GoXam graph is changed the data grid view will update.
Is this possible using the data binding feature of GoXam?
Yes, that should work, assuming that all the data that you use implement INotifyPropertyChanged and INotifyCollectionChanged. The main issue is that if you want to support undo/redo, you’ll have to make sure that all of the actions performed on the model data start and commit a transaction.
Would i be best to set up a DataTable and have the Graph and Gridview both bound to the DataTable?
To do this i need to set up listeners for almost all events? Such as “Node Created”, “LinkDrawn”, “LinkRelinked” etc? or is there a better way of listening for changes to the model so i can keep the DataTable/DataGrid current?
It wouldn’t make sense to try to bind some independent Control to a in a Node template, because Nodes are created and destroyed dynamically, so you could not reasonably try to bind your Control to a particular TextBlock. Instead you would have both your Control and the Node’s TextBlock bound to the same data in the model.
In looking down the list of samples in GoWpfDemo, I suppose “Link Demo” is the first obvious case of having a bunch of Controls that show the state of the selected Node or selected Link. But there isn’t much data binding in that XAML – instead the Buttons have event handlers that modify the model data.