Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
604
Clicking & DoubleClicking on LabelPresenter
posted

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

Parents
No Data
Reply
  • 69686
    posted

    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.

Children