Any suggestions on how one might go about dynamically changing the type of node on a diagramview?
I would like to use a flow chart to present information to a user in two different formats depending on the view they use to implement.
View one would use ShapeNodes and Containers which would be related to each other using linkobjects.
View two would use TableNodes and containers which would mirror the relationships defined previously.
When user wanted view 1 they would see the shape nodes, when users wanted view 2 they would see the tablenodes.
I would like to implement this on the fly if at all possible, i.e. allow users to select a view from a pulldown.
My initial thoughts for this were to:
- Create a custom object which would inherit from diagram node.
- It would store objects for a ShapeNode and for a TableNode.
- It would have a method for changing the current presented node etc. and call the draw method.
however I need an IGraphics interface object and some RenderOptions and cannot seem to find where in the diagram or diagram view these are implemented or what object I can cast to this to be able to implement this.
In addition after I create this object and add it to a flow chart it doesn't allow me to move the item etc.
Related to this topic I would like to trap events on this newly created node. So if a user were to click on a node which might raise a selected event that event could pass back information to a property grid.
Any suggestions or ideas on this topic are greatly appreciated and if you need more information please let me know.
Thanks