From b6d33730ee2e6a7e395a35e9424ddf0e23bd89e1 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Mon, 14 Oct 2013 17:50:52 +0200 Subject: [PATCH] add thread to exmepage --- CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs index 72142fa0..cf2c0e0a 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs @@ -43,7 +43,6 @@ namespace CampusAppWP8.Pages.Exams this.BachelorItem.Header = CampusAppWPortalLib8.Resources.AppResources.Degree_Bachelor; this.MasterItem.Header = CampusAppWPortalLib8.Resources.AppResources.Degree_Master; this.DiplomItem.Header = CampusAppWPortalLib8.Resources.AppResources.Degree_Diploma; - this.DefHeader.ProgressVisibility = Visibility.Visible; this.InitializeFeed(); } @@ -65,6 +64,7 @@ namespace CampusAppWP8.Pages.Exams this.InitializeFeed(); } + this.DefHeader.ProgressVisibility = Visibility.Visible; Thread thread = new Thread(new ThreadStart(this.LoadingFeed)); thread.Start(); @@ -117,13 +117,10 @@ namespace CampusAppWP8.Pages.Exams if (this.Dispatcher != null) { this.Dispatcher.BeginInvoke(new Action(() => this.SetupExamList())); - this.Dispatcher.BeginInvoke(new Action(() => this.DefHeader.ProgressVisibility = Visibility.Collapsed)); } else { this.SetupExamList(); - this.DefHeader.ProgressVisibility = Visibility.Collapsed; - } } @@ -158,6 +155,7 @@ namespace CampusAppWP8.Pages.Exams this.MasterPanel.ItemsSource = masterList; this.DiplomaPanel.ItemsSource = diplomaList; this.ExamPivot.SelectedIndex = this.CalcSelectedIndex(); + this.DefHeader.ProgressVisibility = Visibility.Collapsed; } /// Calculates the selected index.