WPF – Touchdown event firing at overlapping controls.

This happens when a button or link behind another button or link is getting its touchdown event fired as well.

The fix here:

1. Make sure tap event of both controls are subscribed on the Touchdown event.
2. Put a e.Handled = true; statement inside the eventhandler of the overlapping control.

Example:

Code Snippet
  1. private void OpenDoctor_Touch(object sender, TouchEventArgs e)
  2. {
  3.     e.Handled = true;
  4.     string commandParameter = ((Button)sender).CommandParameter.ToString();
  5.     var viewModel = (DoctorsBySpecializationViewModel)DataContext;
  6.     if (viewModel.OpenDoctor.CanExecute(commandParameter))
  7.         viewModel.OpenDoctor.Execute(commandParameter);
  8. }

Happy Coding!