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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
PreviewMouseLeftButtonDowninstead:xaml:
code:
I’ve tested this and it works no matter how many times i click