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 environmnent, 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.

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.

© 2008 The Orbifold.