protected override void OnNavigatedTo(NavigationEventArgs e) { PopupService.Init(layoutRoot); LoggingService.LogInformation("Showing splash screeen", "Views.HomeView"); _vm = new FlickrViewModel(Dispatcher); _vm.ChangeState += _vm_ChangeState; this.DataContext = _vm; //_vm.ShowLoginCommand.Execute(null); //AppDatabase.Current.DeleteProjects(SessionID); if (_vm.IsFlickrLoginDetailsCached()) { //NavigationService.NavigateOnUI("HomeView"); _vm.ViewInit(); ucLoginOrLoggedIn.LoadDetails(_vm.FullName, _vm.BuddyIconUrl, Controls.Flickr.UserCard.CardPosition.Left); butLoginRequest.Tag = "Loggedin"; } else { ucLoginOrLoggedIn.LoadDetails("Login", "ms-appx:///Assets/FlickrLogin.PNG", Controls.Flickr.UserCard.CardPosition.Left); butLoginRequest.Tag = "Login"; } ucPublic.LoadDetails("Public", "ms-appx:///Assets/FlickrPublic.PNG", Controls.Flickr.UserCard.CardPosition.Right); sbShowCards.Begin(); sbLoadView.Begin(); //NotifyGCTotalMemory(); }
public void CheckIfFlickrLoggedIn() { if (_fvm.IsFlickrLoginDetailsCached()) { ContentFrame.Navigate(typeof(YourDashboardView)); } else { ContentFrame.Navigate(typeof(PublicDashboardView)); } }