diff --git a/WindMobile-WP7/View/MainPanoramaView.xaml b/WindMobile-WP7/View/MainPanoramaView.xaml index 792256e..0bcca46 100644 --- a/WindMobile-WP7/View/MainPanoramaView.xaml +++ b/WindMobile-WP7/View/MainPanoramaView.xaml @@ -129,7 +129,12 @@ - + + + + + diff --git a/WindMobile-WP7/ViewModel/MainViewModel.cs b/WindMobile-WP7/ViewModel/MainViewModel.cs index 86591b7..b205d6b 100644 --- a/WindMobile-WP7/ViewModel/MainViewModel.cs +++ b/WindMobile-WP7/ViewModel/MainViewModel.cs @@ -29,10 +29,11 @@ public class MainViewModel : ApplicationViewModel private ListStationInfoService listService; private RelayCommand refreshCommand; + private Visibility progressVisibility; public MainViewModel() { - + ProgressVisibility = Visibility.Collapsed; } public string PageName @@ -54,6 +55,7 @@ protected ListStationInfoService ListService { RaisePropertyChanged("StationInfoList"); RefreshCommand.RaiseCanExecuteChanged(); + ProgressVisibility = Visibility.Collapsed; }; listService.ErrorOccured += (s, e) => { @@ -95,6 +97,7 @@ public RelayCommand RefreshCommand refreshCommand = new RelayCommand( () => { + ProgressVisibility = Visibility.Visible; ListService.Refresh(null); refreshCommand.RaiseCanExecuteChanged(); }, @@ -104,5 +107,16 @@ public RelayCommand RefreshCommand return refreshCommand; } } + + public Visibility ProgressVisibility + { + get { return progressVisibility; } + set + { + progressVisibility = value; + RaisePropertyChanged("ProgressVisibility"); + } + } + } } \ No newline at end of file