The topic is too broad. There can be a lot of design ideas involved; and we don't know your requirements.
So, I can give your only one but big advice: Use WPF, place all your diagram elements on
Canvas
, see
http://msdn.microsoft.com/en-us/library/system.windows.controls.canvas.aspx[
^].
WPF is designed as if diagramming was one of its primary goal. A lot of functionality which would take major part of design and development time with other libraries is already very well implemented in WPF. In the field of diagramming, even it you used only
System.Windows.Forms
before and have no idea of WPF, the benefits of this foundation will outweigh the time you may need to learn new library very soon, maybe you will even observe it during first 10% of your time spent on the project.
[EDIT]
Another idea is this: create a separate
data model for you diagrams. It should be a set of pure-data classes. Of course some classes should describe geometrical and presentation properties of diagram elements: size, color, etc. Try to isolate two parts of the model: logical and geometrical.
Develop separate methods for rendering diagram based on the model and update of the model based on the edit events on the diagram.
I think, the most adequate design pattern for the application is MVC or MVVM (which is designed with WPF as one of its targets in mind). Please see:
http://en.wikipedia.org/wiki/Model-view-controller[
^],
http://en.wikipedia.org/wiki/MVVM[
^].
For persistence of the data model, use Data Contract. Please see
http://msdn.microsoft.com/en-us/library/ms733127.aspx[
^].
Please also see my past solution where I advocate this approach:
How can I utilize XML File streamwriter and reader in my form application?[
^],
Creating property files...[
^],
deseralize a json string array[
^].
—SA