Click here to Skip to main content
13,399,083 members (31,425 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 30 Jan 2010

Multi selection TreeView in WPF... the easy way.

, 30 Jan 2010
Rate this:
Please Sign up or sign in to vote.
Want to use multi selection in WPF TreeView ? <Setter Property="BorderBrush"...
Want to use multi selection in WPF TreeView ?

<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="BorderThickness" Value="1"></Setter>
<Trigger  Property="c:TreeViewExtensions.IsSelected"  Value="True" >
 <Setter Property="BorderBrush" Value="Gray"></Setter>


<TreeView c:TreeViewExtensions.EnableMultiSelect="true"

c:TreeViewExtensions.SelectedItems="{Binding SelectedItems}"

ItemsSource="{Binding Items}"

... />

Code and sample on my blog[^].


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


About the Author

Nicolas Dorier
Software Developer Freelance
France France
I am currently the CTO of Metaco, we are leveraging the Bitcoin Blockchain for delivering financial services.

I also developed a tool to make IaaS on Azure more easy to use IaaS Management Studio.

If you want to contact me, go this way Smile | :)

You may also be interested in...


Comments and Discussions

GeneralReason for my vote of 1 it's bad Pin
bean_dou27-Dec-11 2:08
memberbean_dou27-Dec-11 2:08 
GeneralRe: what is bad ? do you have a better solution ? Pin
Nicolas Dorier27-Dec-11 2:23
memberNicolas Dorier27-Dec-11 2:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180218.2 | Last Updated 30 Jan 2010
Article Copyright 2010 by Nicolas Dorier
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid