void ImageEventsListPage_Loaded(object sender, RoutedEventArgs e) { _progressIndicator = new ProgressIndicator(); _progressIndicator.IsVisible = true; SystemTray.ProgressIndicator = _progressIndicator; model = new EventsListViewModel(); model.Category = Category; model.Load(); _progressIndicator.IsVisible = false; this.DataContext = model; }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); if (!PhoneApplicationService.Current.State.ContainsKey("ListEvents")) { MessageBox.Show("Il n'y pas de données présentes"); NavigationService.GoBack(); return; } model = PhoneApplicationService.Current.State["ListEvents"] as EventsListViewModel; }