Welcome to WindowsClient.net | Sign in | Join

Cristian Ricciolo Civera

Windows Presentation Foundation, C++ CLI, LINQ and experiments

Sponsors





  • advertise here

A complete WPF TreeListView control

Yes, I know, there already is a TreeListView control in the SDK, but it's simple and it isn't complete, so I developed a my custom control working on .NET Fx 3.0/3.5. It supports template, binding, scrolling and themes (classic, aero, luna). It's quite simple to use:

<r:TreeListView ItemsSource="{Binding Source={StaticResource data},XPath=/opml/body/outline/outline}" ItemTemplate="{StaticResource dt}">
    <r:TreeListView.Columns>
        <GridViewColumn Header="Title" DisplayMemberBinding="{Binding XPath=@title}" Width="150" />
        <GridViewColumn Header="Childs" DisplayMemberBinding="{Binding XPath=@count}" Width="100" />
        <GridViewColumn Header="Url" DisplayMemberBinding="{Binding XPath=@xmlUrl}" Width="200" />
    </r:TreeListView.Columns>
</r:TreeListView>

And below a screenshot of the control in action:

The control inherits from TreeView and TreeViewItem classes and uses a custom converter to indent items. The most of work is into the xaml files, built copying markup from original TreeView and ListView styles.
I used this control into my project PaperBoy.

I hope you find useful :-). Download full source control.

Comments

Hai said:

Nice control...

Have tryed to migrate it to Silverlight.. without success....

Any chance that you will make a control like this in silverlight ?

Anyway, thank for that :-}

# November 30, 2008 11:18 AM

RiccioloCristian said:

Thanks, happy to know it :-)

There is few that I can reuse for a Silverlight porting. It's more simple to rewrite it, but it's a nice idea so I hope to get more time to work on it

# December 1, 2008 2:35 PM

Hai said:

Hi RiccioloCristian...

This will be a great contribution to the silverlight community

I've been working with ASP for a few years now and I DON'T LIKE IT !!!

XAML is a great technology from my POV and Compare to ASP Silverlight is much more... everything... :-}

May the force be with you...

Hai

# December 2, 2008 11:34 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Page view counter