void maps_starting_locations_Click(object sender, RoutedEventArgs e) { if (this.activeMap != null) { StartLocationsDialog dialog = new StartLocationsDialog(this.activeMap.GetValue("start_locations")); dialog.ShowDialog(); this.activeMap.SetValue("start_locations", dialog.FinalValue); } }