public static SignUpPageViewModel GetSignUpPageViewModel()
 {
     LockingObject = new object();
     if (SignUpVm == null)
     {
         lock (LockingObject)
         {
             if (SignUpVm == null)
             {
                 SignUpVm = new SignUpPageViewModel();
                 //this LoadHomePage() call out has to be done when homeVM is created, NOT when homeVM is called out.
                 //It can't be done in ctor because, homeVM won't be assinged a value and algorithm becomes indefitely recursive.
                 //Call it out here when homeVM has been assign non-null value, so this part of code won't be reached again.
                 //base.LoadLoginPage();
             }
         }
     }
     return(SignUpVm);
 }
Beispiel #2
0
 /// <summary>
 /// Updates CurrentViewModel to SignUpPageViewModel. If view's DataTemplate and DataContext is binded, then view is changed and control is given over to SignUpPageViewModel.
 /// </summary>
 protected void LoadSignUpPage()
 {
     CurrentViewModel = SignUpPageViewModel.GetSignUpPageViewModel();
 }