No surprise here I guess, this is a variation on my ealier posting but now on the basis of database information rather than assembly (reflected) data.
Althoug it might look like a piece of cake to display this kind of information and it seems like a simple shift from the class shape discussed earlier, it was quite a challenge to dot it. Not so much the diagramming part but the data grid inside the shape was somewhat difficult. While there is a datagrid for WPF it would be a heavy load on the diagramming surface to include it in the shape containers. So, the only option was to create a home-made lightweight datagrid. In addition, it had to have an inline editing capability in the form of comboboxes, textboxes, checkboxes and more. Finally, I also wanted the whole shape to have different view states; totally collapsed, names only and the full datagrid view.
In the picture you can see a sample diagram with the various features;
Although I did not fully develop things, one can go the full nine yards and turn this sample into either a database visualizer or a database editor (or both) much like in SQL Server’s management studio. Using the integrated analysis service of G2 one could also traverse the diagram and create scripts or XML on top of it. Well, you got the point I guess.
As always a nice post. Have you ever thought about some kind of “Subshape”? This subshape would contain a workspace(drawing surface) and could hold several other shapes. The user could gain more space by collapsing it. Or it would also be possible to double click it and open a new workspace with the shapes in it. This would allow the user to model parts of the system and view them as a whole without the need of zooming or scrolling too much.
By ThomasS January 12, 2009 - 7:38 amThe idea of a popping up sub-space is interesting and new to me. In theory rather easy to achieve, one could dock a diagramming surface in the adorner layer and use it as an ‘editor’ much like the resizing thumbs or the connection-labels editor are sitting in the adorning layer.
If you mean the traditional grouping concept, that’s something which has been built into the model at a low level but the visualization of it on the surface level is not complete. Because there is a loose coupling between the model/data (in a MVC sense) and the view I can represent the group-concept on the surface in any way I like. The simplest would be to wrap grouped objects in a container (a HeaderedItemControl in fact). Not difficult to do, it’s just not something I’ve focused on yet.
The same idea of grouping on the surface level is, however, currently being used in the development of a workflow designer. The actual workflow shapes or entities are layed out through boxes which force the linear (top-down) structure.
Thanks for this interest idea and comment!
By Francois Vanderseypen January 12, 2009 - 8:10 amHi, where can I to download the example? its look very cool
By Pablo A Castillo April 2, 2009 - 1:57 amNice, can I help to complete the sample?
By Andre Moraes April 3, 2009 - 7:49 pmI mean help to add to it what’s needed to go the next nine yards?