public MainWindow() { InitializeComponent(); removeMethod(); trekSpots = TestStorge.ReadXml <ObservableCollection <Hill> >("trekSpots.xml"); var combolist = trekSpots.Select(x => x.difficulty).Distinct(); Combo_Difficulty.ItemsSource = combolist; Grd_spots.ItemsSource = trekSpots; }
private void Window_Loaded(object sender, RoutedEventArgs e) { removeMethod(); trekSpots = TestStorge.ReadXml <ObservableCollection <Hill> >("trekSpots.xml"); //TestStorge.WriteXml<ObservableCollection<Hill>>(trekSpots, "trekSpots.xml"); }