MouseLeftButtonUp Error

793 Views Asked by At

A few days ago I accidently did a replace on the Entire Solution - I was replace a MouseLEftButtonUp by _Tap. Now, even though I am doing a Tap event on an image in Windows Phone, I get the following error:

Failed to assign to property 'System.Windows.UIElement.MouseLeftButtonUp

Does anyone know how I can fix this? It's a very specific problem.

1

There are 1 best solutions below

0
On

That is most likely due to the fact that the event signature of UIElement.MouseLeftButtonUp is different that UIElement.Tap.

The MouseLeftButtonUp uses a MouseButtonEventHandler, but the Tap requires a EventHandler<GestureEventArgs>, so you'll have to go to all your handlers and change the MouseButtonEventArgs e parameter to EventArgs<GestureEventArgs> e.