public MainWindow() { Mode = 0; DailyExhibitions = new Exhibitions(Mode); InitializeComponent(); this.DataContext = DailyExhibitions; ListOfExhibitions.ItemsSource = DailyExhibitions.exh; ListwithInformation.ItemsSource = DailyExhibitions.exh; ListOfExhibitions.Items.Refresh(); ListwithInformation.Items.Refresh(); }
private void ChangeTheHall_Click(object sender, RoutedEventArgs e) { switch (Mode) { case 0: { DailyExhibitions = new Exhibitions(Mode); ListOfExhibitions.ItemsSource = DailyExhibitions.exh; ListwithInformation.ItemsSource = DailyExhibitions.exh; Mode = 1; break; } case 1: { DailyExhibitions = new Exhibitions(Mode); ListOfExhibitions.ItemsSource = DailyExhibitions.exh; ListwithInformation.ItemsSource = DailyExhibitions.exh; Mode = 2; break; } case 2: { DailyExhibitions = new Exhibitions(Mode); ListOfExhibitions.ItemsSource = DailyExhibitions.exh; ListwithInformation.ItemsSource = DailyExhibitions.exh; Mode = 3; break; } case 3: { DailyExhibitions = new Exhibitions(Mode); ListOfExhibitions.ItemsSource = DailyExhibitions.exh; ListwithInformation.ItemsSource = DailyExhibitions.exh; Mode = 4; break; } case 4: { DailyExhibitions = new Exhibitions(Mode); ListOfExhibitions.ItemsSource = DailyExhibitions.exh; ListwithInformation.ItemsSource = DailyExhibitions.exh; Mode = 0; break; } } }