public AppCoordinator() { _loginVM = new LoginVM(); _loginPage = new LoginPage(_loginVM); _successPage = new SuccessPage(); _failurePage = new FailurePage(); _simpleLoginVM = new SimpleLoginVM(); _simpleLoginPage = new SimpleLoginPage(_simpleLoginVM); //_rootPage = _loginPage; _rootPage = _simpleLoginPage; setupMGR(); setupMGRAuth(); setupMGRAuthTransitions(); }
public SimpleLoginPage(SimpleLoginVM viewModel) { InitializeComponent(); ViewModel = viewModel; // Listen to UPLView signals. this.WhenAnyValue(x => x.UPLView.VM.Signal) .ObserveOn(RxApp.MainThreadScheduler) .Subscribe(signal => { Debug.WriteLine("SimpleLoginPage. Signal: '{0}'", signal); }); // Listen to UPLView username change. this.WhenAnyValue(x => x.UPLView.VM.Username) .ObserveOn(RxApp.MainThreadScheduler) .Subscribe(username => { Debug.WriteLine("SimpleLoginPage. Username: '******'", username); if (username == "REPLACE") { UPLView.VM.Username = "******"; } }); }