// If btnOpenMap gets clicked open new window with map. private void btnOpenMap_Click(object sender, RoutedEventArgs e) { var tag = ((Button)sender).Tag; Station station = (Station)tag; MapWindow map = new MapWindow(station.Coordinate.XCoordinate, station.Coordinate.YCoordinate); map.ShowDialog(); }
// If btnOpenMapNear gets clicked open new window with map. private void btnOpenMapNear_Click(object sender, RoutedEventArgs e) { MapWindow map = new MapWindow(); map.ShowDialog(); }