Skip to main content

Microsoft Silverlight

Answered Question How to create TreeMap in Silverlight2?RSS Feed

(0)

tanusree
tanusree

Member

Member

29 points

77 Posts

How to create TreeMap in Silverlight2?

Can anyone help me in creating TreeMap in Silverlight2?

Thanks in advance,

Tanusree

Isaak
Isaak

Member

Member

530 points

94 Posts

Re: How to create TreeMap in Silverlight2?

If I undestood your problem, you can create a class that will hold each Tree Level and its associated children. For example, the following class can be used as your data model, while you can directly bind a collection in the Silverlight Control Toolkit TreeView, using the HierarchicalDataTemplate:

public class TreeViewLevel

{

public TreeViewLevel(string name, string pictureUrl,string country, params TreeViewLevel[] children)

{

Name = name;

Picture =
new BitmapImage(new Uri(pictureUrl, UriKind.Relative));

Country = country;

Children = children;

}

public string Name { get; set; }

public BitmapImage Picture { get; set; }

public TreeViewLevel[] Children { get; set; }

public string Country { get; set; }

}

clint1222
clint1222

Participant

Participant

1542 points

216 Posts

Answered Question

Re: How to create TreeMap in Silverlight2?

Descry posted some code on Codeplex to create a treemap.  http://www.codeplex.com/descry

Here's a link to a sample of their treemap control http://descry.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=26550

I was able to use it to create a pretty good treemap.  If you run into any problems let me know, I'll help you out.

Note: as pointed out on the site, it's raw code that may require some tweaking to use.

pragati_sd
pragati_sd

Member

Member

52 points

24 Posts

Answered Question

Re: How to create TreeMap in Silverlight2?

Plz check this link

http://www.codeproject.com/KB/recipes/treemaps.aspx

Download the the project & check, you need to modify somethings. I've created the Treemap with the base logic from this itself.

 

 

cricosta
cricosta

Member

Member

2 points

1 Posts

Re: How to create TreeMap in Silverlight2?

I realize this thread has closed a while ago, but just for future reference the latest version of SL Toolkit now includes a TreeMap too:

http://blogs.msdn.com/delay/archive/2009/07/10/silverlight-charting-gets-an-update-and-a-treemap-silverlight-toolkit-july-2009-release-now-available.aspx

 

GarB
GarB

Member

Member

2 points

1 Posts

Re: How to create TreeMap in Silverlight2?

Also check out the GPD-E team blog, they contributed the control to the toolkit. http://blogs.msdn.com/gpde/

 

 

pragati_sd
pragati_sd

Member

Member

52 points

24 Posts

Re: How to create TreeMap in Silverlight2?

Hi!!

Has anyone used this new control - TreeMap in application with data of type Hierarchy more than 2 / 3 .. Like  - Root - Subitems - SubItems - so on.....

Please, share the xaml as well as xaml.cs

Email ID - pragati.dukale@revalanalytics.com

Thanks in advance.

Pragati 

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities