Hi Mark,
Thank
you for your update.
Query
: need something that says
"only trigger this event if the mouse cursor is ON TOP of the top-most
selected node".
We
have checked your query and understood that you want to hook the double click
event only on clicking the node text region and not on besides the node. You
can restrict this behavior by fetching the TextBlock and invoke the
previewMouseDown event. Please find the code for the same.
Code:[C#]
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { foreach (TreeViewItemAdv item in this.treeview.Items) { TextBlock tblock = VisualUtils.FindDescendant(item,
typeof(TextBlock)) as TextBlock; tblock.PreviewMouseDown +=
Tblock_PreviewMouseDown; } } private void Tblock_PreviewMouseDown(object sender, MouseButtonEventArgs e) { if (e.ClickCount == 2) { MessageBox.Show("Double
Clicked top most node."); } } |
We
have also attached the sample for your reference. Please download it from
following location:
Sample: https://www.syncfusion.com/downloads/support/forum/149352/ze/TreeViewMousedown1473338158
Please
try this solution and let us know if it meets your requirement.
Regards
Vijayalakshmi
V.R.