private void nightField_click(object sender, RoutedEventArgs e) { List <Map> loadedMaps = fileManager.LoadMaps("../../../AppData/Maps.json"); Map loadedMap = new Map(null, null, null); foreach (Map map in loadedMaps) { if (map.Name == "Night Field") { loadedMap = map; } } Combat p = new Combat(loadedMap); NavigationService.Navigate(p); }