Reputation: 642
I am using C#, Silverlight, WP7.
What is the difference between a Tap event and the sequence of MouseLeftButtonDown and MouseLeftButtonUp events? Also why doesn't a Tap event always trigger MouseLeftButtonDown/MouseLeftButtonUp in sequence? Are these events any different in simulation on the computer and deployed on a phone?
I can't find this in the documentation and my own tests seem to imply that a really quick click on the screen won't always generate a MouseLeftButtonDown/MouseLeftButtonUp sequence. Are these mutually exclusive events? If not, what is the order of events?
Thanks in advance.
Upvotes: 0
Views: 515
Reputation: 2525
Although the mouse events are available on WP7, they are not necessarily reliable.
User input in Windows Phone includes manipulation events, mouse events, and touch events.
Manipulation events are the recommended way to handle user input. Unless you have a specific need, you should avoid using mouse events in your Silverlight applications for Windows Phone for performance and hardware compatibility reasons. Instead, you should use manipulation events. You can also use Tap, DoubleTap, and Hold events on any elements that derive from UIElement such as the base controls.
http://msdn.microsoft.com/en-us/library/ff967560%28v=VS.92%29.aspx
Upvotes: 1