Noodling Network Nodes - Diagraming with the NetworkView custom WPF control

Description

If you're working on a project where node diagraming plays a part, yet Visio or a commercial product is overkill, check out NetworkView: A WPF custom control for visualizing and editing networks, graphs and flow-charts hosted on CodeProject [Insert standard "CodeProject is just an awesome resource for projects, code and ideas" line here]

I've not seen a control like this in a while that's both free, source available and pretty complete. I liked how the sample projects not only worked (which is a good thing) but included polished touches like this help window. image

What's even better than the control is the depth the article goes into.

"This article examines the use and implementation of a WPF custom control that is used to display and edit networks, graphs and flow-charts. NetworkView, as I have called it, was inspired by and has many similarities to standard WPF controls such as ItemsControl and TreeView. The article and the sample code show how to use the control from XAML and from C# code.

This article is arranged in two main parts.

Part 1 examines NetworkView usage with walkthroughs of the two sample projects. This part and the reference section are enough if you just want to use NetworkView.

Part 2 goes into detail on the implementation. This will be useful if you want to make your own modifications to NetworkView or if you want to understand my approach to developing a complex WPF custom control.

At the end of the article is a reference section that describes the public properties, methods and commands exposed by NetworkView.

In previous articles I have covered a number of WPF techniques: use of adorners, zooming and panning,binding to UI element positions and most recently drag-selection of multiple items. NetworkView and the sample applications make use of all these techniques. I won't be covering these techniques in detail here. Instead, where appropriate, I'll refer back to previous articles.

NetworkView is intended to be backed with an application-specific view-model. ...

SNAGHTML37707580

...

From concept through implementation this 27 page article hits all the high points and beyond.

The included source downloads and runs with no issues. Here's a snap of the Solution

SNAGHTML37666653

The code seems logical organized and is easy to follow.

SNAGHTML37674a6a

And this snip shows how easy it can be to use.

SNAGHTML3773f46f

If you need the control, or just want to see how someone would develop something like this, the article and source are an interesting read.

Page thumbnail curtsey of dullhunk

 

test

The Discussion

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.