In my TreeView
, I have different events for MouseDown
/MouseUp
, etc but when I do it fast enough the TreeView
expands/collapses the TreeNode
. I don't want this baked-in behaviour.
Is there a way to disable this?
In my TreeView
, I have different events for MouseDown
/MouseUp
, etc but when I do it fast enough the TreeView
expands/collapses the TreeNode
. I don't want this baked-in behaviour.
Is there a way to disable this?
You could suppress the double click event of TreeViewItem like so:
xaml:
code:
UPDATE
According to msdn docs:
I'm not sure if this why you are having issues or not, but we'll do it the MSDN way and use
PreviewMouseLeftButtonDown
instead:xaml:
code:
I've tested this and it works no matter how many times i click