Click here to Skip to main content
15,886,835 members
Articles / Desktop Programming / WPF

A Graph Tree Drawing Control for WPF

Rate me:
Please Sign up or sign in to vote.
4.84/5 (34 votes)
23 Feb 2009CPOL10 min read 283.1K   9K   139  
This article describes and implements a graph drawing control for tree structures structured in a WPF panel.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GraphLayout
{
	public interface ITreeNode
	{
		// PrivateNodeInfo is a cookie used by GraphLayout to keep track of information on
		// a per node basis.  The ITreeNode implementer just has to provide a way to
		// save and retrieve this cookie.
		Object PrivateNodeInfo { get; set;  }

		TreeNodeGroup TreeChildren { get; }
		double TreeWidth { get; }
		double TreeHeight { get; }
		bool Collapsed { get; }
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
I've been doing programming for close to 30 years now. I started with C at Bell Labs and later went to work for Microsoft for many years. I currently am a partner in Suckerpunch LLC where we produce PlayStation games (www.suckerpunch.com).

I am mainly interested in AI, graphics and more mathematical stuff. Dealing with client/server architectures and business software doesn't do that much for me. I love math, computers, hiking, travel, reading, playing piano, fruit jars (yes - I said fruit jars) and photography.

Comments and Discussions