public async Task NavigateToErrorPageAsync(NavigationData.NavigationData navigationData)
        {
            var mainViewModel      = _viewModelProvider.MainViewModel;
            var errorPageViewModel = _viewModelProvider.ErrorPageViewModel;

            mainViewModel.MainPage = errorPageViewModel;

            await errorPageViewModel.InitializeAsync(navigationData);
        }
        public async Task NavigateToLoginPageAsync(NavigationData.NavigationData navigationData)
        {
            var mainViewModel = _viewModelProvider.MainViewModel;
            var loginViewodel = _viewModelProvider.LoginViewModel;

            mainViewModel.MainPage = loginViewodel;

            await loginViewodel.InitializeAsync(navigationData);
        }
 public async Task NavigateToPageAsync(NavigableViewModel navigationPage, NavigationData.NavigationData navigationData)
 {
     if (navigationPage is LoginViewModel)
     {
         await NavigateToLoginPageAsync(navigationData);
     }
     else
     {
         await NavigateToMainPageAsync(navigationData);
     }
 }
        private async Task <MainPageViewModel> SetupMainPage(NavigationData.NavigationData navigationData)
        {
            var mainViewModel     = _viewModelProvider.MainViewModel;
            var mainPageViewModel = _viewModelProvider.MainPageViewModel;

            if (mainViewModel.MainPage == mainPageViewModel)
            {
                return(mainPageViewModel);
            }

            mainViewModel.MainPage = mainPageViewModel;
            await mainPageViewModel.InitializeAsync(navigationData);

            return(mainPageViewModel);
        }
        public async Task NavigateToSettingsPageAsync(NavigationData.NavigationData navigationData)
        {
            var mainPageViewModel = await SetupMainPage(navigationData);

            mainPageViewModel.NavigationToolBar.IsBusy = true;
            try
            {
                var settingsViewModel = _viewModelProvider.SettingsPageViewModel;
                mainPageViewModel.SelectedPage = settingsViewModel;

                await settingsViewModel.InitializeAsync(navigationData);
            }
            finally
            {
                mainPageViewModel.NavigationToolBar.IsBusy = false;
            }
        }