tags:

views:

225

answers:

1

Hi. I developing an application in WPF where a single click on an item will change the view to something else. The problem is that if the user double clicks on the item, the first event will be the single click that opens the other view and the next event will be the double click on the new view. This double click on the new view will cause other things to happen. So, the question is; Can I stop the double click from happening after I get the single click event to my first view? I have tried to set Handled = true on the MouseButtonEventArgs in the single click method but that does not work. The other view will still get the double click and random things will still happen. Any smart solution of my problem out there?

/Daniel

+1  A: 

RaymondChen is once again a valuable source.

I suggest you read the linked half second delay article for deeper details but that one shows how the delay manifests itself to the user.

ShuggyCoUk
the problem with this solution is that during this half second, the user could click something else and then two things will happen. The thing that happens after the first click on the first item and the thing that happens after the second click on the second item. This could be solved by setting some kind of state in a model for the app so that it knows that a first item already has been klicked. Not so nice solution though.
Daniel Enetoft
If your users are clicking that fast on multiple different elements of the UI I fear custom code and state stored in the appropriate places is the only solution...
ShuggyCoUk