Netron

 

What is it?

The Netron diagramming library is a generic diagramming, graph-drawing and graph-layout kit for the Microsoft .Net framework written in C#.

It allows you to create innovative and highly interactive applications with a minimum of coding in C#. It is fully customizable via inheritance of the base classes. The shapes and functions you need of the node or links can be compiled in separated libraries and are dynamically loaded via the .Net reflection mechanism at run time.

The library has been extensively used in many applications around the world together with the Cobalt IDE, a customized integrated development environmnet, which comes free together with the diagramming library as a demonstration of how you can use the diagramming control. The Cobalt.IDE contains many features and techniques that, in addition to the diagramming library, can help you to get in no time a diagram-enabled application. A more complete list of features can be found below.

 

If you rather prefer a diagramming solution on the basis of WPF rather than GDI, see the Unfold download.

Screenshots

 

 

 

Features

Diagramming library

Auto layout The underlying architecture of the graph layout code has been re-written and now supports any physical embedding (i.e. differential equation). See this blog for some pictures and details of the algorithms.
  • Balloon tree layout: child nodes are grouped in shells around the parent node.
  • Force directed layout: any system of physical forces (springs, gravitation, friction, etc.).
  • Fruchterman-Rheingold layout: one of the classic algorithms.
  • Radial tree layout: child nodes are grouped in shells around the root node.
  • Random layout: a simple yet insightfull randomization of the nodes over the canvas.
  • Standard tree layout: the classic flowchart/hierarchical layout.
Application embedding The diagram control means nothing on its own; your application and business context makes the difference. Many applications have seen the light in the past years which would not have been possible without the embedding of the diagram control and the fact that you can push the code the way you like it. It has been updated to a richer and enterprise level architecture:
  • Design-time support for WinForm (ASP.Net has been developed but will not be released): uses the new .Net design support mechanism.
  • An extended set of UI controls to manipulate all the aspects of the diagram elements (fill color, line style, line caps, z-ordering etc.). There is more than just the diagram control; a toolbox full of code elements and controls to enrich and speed up the creation of your application.
  • SmartTag support: Microsoft's new way to design applications inside Visual Studio 2005.
  • Full undo/redo support: yes, it's finally there!
  • Scripting support (in-memory compilation of C# code): the Coablt IDE demonstrates you how to script the diagram control and manage a diagram with code at run-time.
  • Rich API and DOM to extend and plug into the core: you can use the diagram control and plug into all its interfaces and base classes, you can cut and extend the code to your needs, you can integrate Netron in virtually any application.
  • Open source! No hidden tricks, plain GPL.
  • Rewritten from scratch in function of .Net 2.0.
  • Based on the MVC pattern; easy to maintain and to customize. You asked for it, you've got it.
  • Extensive C# documentation.
  • The Cobalt IDE examplifies all features of the diagramming control and integrates lots of code; integrated scripting engine, a rich DOM, integrated documentation and much more.
  • This sophisticated diagram control covers as good as any diagramming requirements, including data simulations and HMI diagramming.
Graph Analysis
  • Extensive analysis library to work with graphs, trees and spanning trees
  • Kruskal algorithm
  • Dijkstra algorithm
  • Floyd's algorithm
  • Prim's algorithm
  • Critical path algorithm
  • Breadth and depth algorithm aka BFT & DFT)

Shapes and templates
  • Comes with a set of standard shapes
  • The rich DOM allows you to easily extend/create shape (by means of plug-and-play shape materials)
  • Sub-diagrams can be saved/re-used (templating)
  • The heavily re-worked and versatile class-shape mimics the Visual Studio class diagrams and other well-known Microsoft interfaces (Visio, SQL Server, etc.)
Clipboard
  • Full clipboard support: cut, copy, paste.
  • Image and text can be copied to/from the clipboard
  • Dragdrop support of text and images onto the canvas
Display and organization
  • Pan and zoom (both via the mouse and the scrollbars)
  • Multiple pages (aka tabs) in one control
  • Multi-layering of shapes
  • Real-world units (inches, centimeters etc.)
  • Grouping of entities with the possibility to collapse/Expand groups.
  • Grid, rulers, snap and guides...it's all there!
  • z-ordering
Drawing tools
  • Scribble tool
  • Polygon tool
  • Text tool
  • Bezier and smooth polygonal drawing tools
  • Rectangle and ellipse tool

Cobalt.IDE

Modular

The architecture of Cobalt is, much like other plugable systems like Eclipse based on Addins and services configured through the application configuration file. Standard services are, among others, the output service, the browser service, the logging service, the property grid service and the diagram service. You can easily extend the application by means of your own addins and the Yttrium Whiteboard from Chris Ruegg is included as an example of how you can easily plug into the IDE.

 

Neon: a UI library

 

The Cobalt application comes with diverse UI controls packed in the 'Neon' library ; color picker, line picker and other common Office-like controls.

Xeon: an HTTP server

 

The Xeon webserver is a custom multi-threaded HTTP server that can be integrated into any application. It can deliver HTML content by means of

  • static pages
  • C# scriptlets
  • dynamic pages
Many features are configurable in real-time and via the application configuration. The Xeon server is much like the (old) Casini open source webserver or Microsoft's Asp.Net development server which comes with Visual Studio 2005.

 

Scripting

 

The Cobalt IDE comes with a scripting system that allows you to peek and change the modules at run-time. This features was developed in order to present interactive samples showing off the diagramming API. You can create diagram and other UI stuff at run-time by means of the Cobalt DOM and the Netron API. Diverse example are included in the help system of Cobalt.

Updates

The development of Netron has been discontinued in favor of the Unfold library and you are advised to move away from the classic GDI programming paradigm towards Microsoft's Presentation Foundations. You are, however, welcome to post your comments or anything else related to the Netron code in the forum.

Concerning the Cobalt.IDE, the development was necessary in order to test the many features of the diagramming library. In the three years of development SharpDevelop or Eclipse became a very valuable alternative to Cobalt and Microsoft developed their Enterprise Library in conjunction with the wonderful composite application block. As a result, the development of Cobalt has been discontinued as well on and you are advised to invest in Microsoft's application blocks and the possible integration with WPF (see in particular the WPF CAB layer).

Is it free?

The current code is free, see however the license agreement .

What about support?

There is no official support. However, you can find help from the community through the forum and on the author's blog you can find various articles (related to GDI+, .Net programming and other stuff as well) that were written while developing Netron. This overview page of the old Sourceforge website should be of interest, in particular, and also Martin Kuss' backup pages of Netron tutorials and stuff.

For custom solutions and consultancy, please send an Email to us.

Requirements

You need .Net 2+ and Visual Studio 2005 to run and compile the code.

Licensing

The free version is licensed under GPL (General Public License).

This means in essence that:

In particular, organizations or individuals that want to use (part of) the released Netron and/or Cobalt code and do not want to release their application source code are not allowed to do so. Possible exceptions to this rule and other enquiries related to licensing should be presented to us.