Posted 30 June 2022, 6:11 am ESTIs there a way to allow the user to click on the 1st item in the treeview, and then shift+click on a later item and have it select all items in between?
Treeview Shift-Click to select multiple items in sequence
Posted by: dphillips on 30 June 2022, 6:11 am EST
Marked as Answer
Replied 30 June 2022, 6:32 pm ESTHi,
You need to handle ItemExpanded event to select 1st item on expanding a Parent node as:
private void Item_Expanded(object sender, SourcedEventArgs e)
var node = e.Source as C1TreeViewItem;
if(node != null)
node.FirstNode.IsSelected = true;
In order to achieve the requirement to select items using Shift+Click. You need to set SelectionMode=True. On expanding parent node the first item will be selected and then shift+click on a later item will select all items between them.
Please refer the attached sample for the same : C1TreeViewSample.zip