private void Canvas_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { // get mouse coordinates Point mousepos = GetMousePosition(); Result result = DetermineResult(mousepos, null); Result_Received?.Invoke(this, result); }
private void location_Click(object sender, RoutedEventArgs e) { // get mouse coordinates Point mousepos = GetMousePosition(); // get location name LocationItem item = (LocationItem)sender; string location = item.Location; Result result = DetermineResult(mousepos, location); Result_Received?.Invoke(this, result); }