Hi,
I need the following functionality:
on 1 click on label - sort
on double click - some other functionality.
I set LabelClickAction="Sort"
and also implemented the following:
EventManager.RegisterClassHandler(typeof(LabelPresenter), LabelPresenter.MouseDoubleClickEvent, new RoutedEventHandler(onHeaderDoubleClick));
When I double click on the label I see the following:
the field is sorted twice and the MouseDoubleClickEvent is fired.
Question: how can I prevent the double-sorting when I double-click on the label? Isn't there some kind of time interval that helps to distinguish between fast 2 separate clicks and one double-click?
Thanks
Hello,
You should be going for the PreviewMouseDoubleClick event instead of the MouseDoubleClick.
The XamDataGrid will handle any bubbling event with its logic that's why you have to use the tunneling equivalents.
For more information about tunneling and bubbling events and differences between them you can look in the msdn.
Thanks Alex.
I did what yous said, but it worked only for the first double-click. On the following double-clicks again: 2 separate single-clicks occur and than 1 double-click.