3
votes

I'm trying to implement a custom TreeView with multiselect. For my reasons I can't use existing solutions.

My problem is: I have a TreeViewItem some child items of which are disabled. And sometimes when I click on a enabled node and then on disabled node the parent node become selected.

I 'd like to get rid of this default selection behaviour, because all items in my treeview have a databinded property IsSelected which I set when I actually click on the item and I don't want treeview to select some items by yourself!

Update: I need to handle clicks on disabled items, so set IsHitTestVisible to false is not a solution for me.

Any help and ideas would be very appreciated.

1
possible duplicate of WPF TreeView and Disabled Item - LPL
I saw this question, but I actually want to handle click on the disabled item, I only don't want this weird behaviour :( - lena

1 Answers