GoDiagram makes it easy to build applications where users can see and manipulate graphs of nodes connected by links. From simple diagrams to interactive workflows and complex system monitors, GoDiagram helps you quickly create rich displays for your diagramming needs. GoDiagram contains several built-in node types and full sample applications to get your project started quickly. GoDiagram is built from the ground up in C# and is designed to be extensible for your custom needs.
The GoDiagram library, Northwoods.Go, is a set of controls and classes built on the .NET platform. GoDiagram makes it easy to deliver editors that allow users to see and manipulate diagrams of two-dimensional graphical objects arranged in a scrollable window.
GoDiagram provides a variety of basic graphical objects such as rectangles, ellipses, polygons, text, images, and lines. You can group objects together to form more complex objects. You can customize their appearances and behaviors by setting properties and overriding methods.
GoDiagram is written entirely in C#. It only depends on the standard .NET Framework classes and does not explicitly call any external functions.
Here is the full VB.NET source code to MinimalApp. The screenshot shows how the MinimalApp appears after selecting the two initial nodes, drag-copying them, moving them, creating links between some of them, and then renaming a blue one to “blue” and a magenta one to “magenta”.
A GoDiagram view is a control that displays a GoDiagram document. It supports mouse-based object manipulation, including selecting, resizing, moving and copying using drag-and-drop. GoDiagram organizes input behaviors into tools that you can modify, override, or add or remove from a view. The view also supports in-place editing, printing, and grids.
A GoDiagram document implements a model that supports manipulation of objects. Adding an object to the document makes it visible in the document's views. You can organize objects in layers. GoDiagram provides support for composing and manipulating graphs (node & arc diagrams), where nodes have ports that are connected by links.
Flexibility and Extensibility
The GoDiagram library is flexible and extensible. Predefined node classes make it easy to build many kinds of graphs. You can easily customize most objects for application-specific purposes by setting properties or by subclassing. You can add completely new graphical objects to the existing framework.
To provide greater customizability and ease of use, Northwoods offers, as a separate option, another library, Northwoods.Go.Layout. This option extends GoDiagram by providing sophisticated automatic layout algorithms for nodes in graphs. The AutoLayout component is sold and documented separately.
GoObject defines the basics of a graphical object: a bounding rectangle (the Bounds property) and some common attribute properties: Visible, Selectable, Movable, Copyable, Resizable, Reshapable, Deletable, Editable, AutoRescales, ResizesRealtime, and Shadowed. GoObject uses the full power of the .NET System.Drawing namespace for drawing.
There are three kinds of drawing primitive GoObjects:
Shapes, such as rectangles, ellipses, figures, and strokes. Each GoShape instance can have a Pen for drawing the outline of the shape and a Brush for painting the inside of the shape. In addition, Gradient fills are supported.
Text, in various fonts, sizes and colors.
Images, for various kinds of images such as BMP, ICO, JPG, GIF and PNG. GoImage objects can get their image information from files, resource managers, or image lists.
Support for moving, copying, deleting, resizing, and reshaping objects is built in to GoDiagram. Go also supports high-level events, such as SelectionDeleting, SelectionDeleted, ObjectContextClicked, ObjectHover, and ObjectEdited.
GoDiagram makes it easy to build applications where users can see and manipulate graphs of nodes connected by links. GoDiagram provides this functionality with the GoNode, GoPort and GoLink classes. Nodes are groups containing one or more ports. Links connect two ports. (or in similar terminology: nodes and arcs, or entities and relationships, or vertices and edges)
Groups provide a way of making a single “object” out of other objects. Nodes are typically implemented as a group of simpler but distinct objects (such as text and an icon, along with ports for connecting links).
GoDiagram provides many built-in Node classes as well as several samples Node classes.