MultiSelectTreeView control
A WPF TreeView control with support for multiple selection.
MultiSelectTreeView is a .NET/WPF control that displays a hierarchical tree of items that can be browsed, selected, collapsed and edited like in a normal tree control. This control overcomes some of the limitations that the TreeView control included in WPF has. Most prominently, it adds multiple selection and is easier to style in several aspects. It features the Windows 7 Aero theme very closely and adapts to other Windows themes (Luna, Royale, Classic, Aero2). Mouse and keyboard control is largely the same as in Windows Explorer.
Compatibility:
Images
To play with the control and its features, you can run the Demo application from the solution.
Download
master.zipLatest version directly from GitHubYou can also head over to GitHub to download any previous revision or check the issue tracker:
MultiSelectTreeView repository on GitHub
This package is also available through NuGet. That way, it can be integrated and updated in a Visual Studio project very quickly.
MultiSelectTreeView package on NuGet
History
There are a number of efforts available on the web where people have tried to add multiple selection support to tree view controls in Windows Forms and WPF. So I guess there must be some need for it. I was eventually searching for a good solution myself when I needed one for a client project. So there are hacks that take the standard WPF TreeView control and just replace the selection logic, or even just the selection painting, and there are ListView derivates that insert and remove virtual subitems when the user expands or collapses a node. Most of them had some major issues with data handling or keyboard interaction.
Then I found the TreeViewEx project by Goroll which made a good impression and had a solid architecture. It was essentially written from scratch using the base controls WPF provides for this case. In fact it uses the same base classes as the stock TreeView. As I made progress in fixing some of its bugs and understanding its internals (and more WPF in general), I found that this control would be the solution to my needs. In nice contact with the original author, I eventually discovered that we wouldn’t agree on a common source base. Since I didn’t want to give up my extensions, I decided to fork the project publicly, under a new name to avoid confusion. Later, I ported some fixes from the original code, and I’m going to continue monitoring that repository occasionally.
Licence and terms of use
This software is released under the terms of the MIT licence. You can find the detailed terms and conditions in the download.
Statistic data
- Created on 2012-07-31, updated on 2015-02-23.
- Ca. 3 400 lines of code, estimated development costs: 3 400 - 14 000 €