Graphite for WPF

In a previous post I described Graphite for Silverlight which allows you to display diagrams inside a browser with automatic layout (the spring-embedder algorithm). In a swift move I converted the library to a WPF control, which at the same time allowed me to add some features which were less trivial in Silverlight because of the constraint Silverlight imposes in comparison to WPF.

To demonstrate Graphite for WPF I created some kind of ‘star sky’ of science. Ideas, persons and standard nodes are all styled in the host application and you can experiment with the Graphite API and the visual representation (look into the App.Xaml file). When hovering over a node a custom tooltip appears which can also be customized, see the description of Graphite for Silverlight for more details. Zooming of the diagram is implemented through the mouse-wheel. The only restriction of the demo is the maximum amount of ten nodes.

Loading nodes accurs through some XML format which you can define yourself, it’s not part of the control and it allows in this way a wide variety of imports/exports. It would be quite easy, in particular, to attach the application to some web or WCF service and load/unload nodes accordingly (Google search results, social network visualization and so on). See also Microsoft’s .NetMap initiative in this context (it’s not WPF though).

Download the demo
(requires VS2008 and .Net 3.5sp1)

Related Posts

A functional graph library in F#

Read more

Twirl: like Live Pivot but better

We re-invented Live Pivot and took away the limitations along the way.

Read more

13 Responses to Graphite for WPF

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

top