BaconographyWP8.View.LoginPageView.OnNavigatedTo C# (CSharp) Метод

OnNavigatedTo() защищенный Метод

protected OnNavigatedTo ( System.Windows.Navigation.NavigationEventArgs e ) : void
e System.Windows.Navigation.NavigationEventArgs
Результат void
		protected override void OnNavigatedTo(NavigationEventArgs e)
		{
			var vm = ServiceLocator.Current.GetInstance<LoginPageViewModel>() as LoginPageViewModel;
			if (vm != null)
			{
				if (!String.IsNullOrEmpty(vm.CurrentUserName))
					pivot.SelectedIndex = 1;

				vm.LoadCredentials();

				if (vm.Credentials.Count > 0)
					pivot.SelectedIndex = 1;
			}
			base.OnNavigatedTo(e);
		}