private void SetbindingContext() { if (this.GetType() == typeof(MainPage)) { BindingContext = new MainPageVM(); } else if (this.GetType() == typeof(LoginPage)) { BindingContext = new LoginPageVM(); } else if (this.GetType() == typeof(RegisterPage)) { BindingContext = new RegisterPageVM(); } else if (this.GetType() == typeof(AddPet)) { BindingContext = new AddPetVM(); } else if (this.GetType() == typeof(PetsPage)) { BindingContext = new PetsPageVM(); } else if (this.GetType() == typeof(MainDetails)) { BindingContext = new MainDetailsVM(); } }
public RegisterPage(MainWindow mainWindow) { InitializeComponent(); _mw = mainWindow; _AccountNnumber = GenerateAccountNumber.Method(_mw); this.AccountNumberLabelOutput.Content = _AccountNnumber; _vm = new RegisterPageVM(_mw, this); _mw.DataContext = _vm; }
public RegisterPage() { viewModel = new RegisterPageVM(new SQLiteDataService()); InitializeComponent(); navbar.button_register.Click += RegisterTransition; navbar.button_login.Click += ProfileTransition; navbar.button_FAQ.Click += FAQTransition; content.buttonCancel.Click += GoBack; content.buttonUploadPhoto.Click += UploadPhoto; content.buttonRegister.Click += Register; content.comboGroup.ItemsSource = viewModel.GetGroups(); }
public RegisterPageVMTest() { authService = new Mock <IAuthService>(); navigateService = new Mock <INavigateService>(); App.Data = new DataStorage(It.IsAny <string>()) { AuthService = authService.Object, NavigateService = navigateService.Object }; user = new User { Login = "******", Password = "******", RepeatPassword = "******" }; vm = new RegisterPageVM(); }
private void SetbindingContext() { if (this.GetType() == typeof(MainPage)) { //BindingContext = Activator.CreateInstance(typeof(MainPageVM)); BindingContext = new MainPageVM(); } else if (this.GetType() == typeof(LoginPage)) { BindingContext = new LoginPageVM(); } else if (this.GetType() == typeof(RegisterPage)) { BindingContext = new RegisterPageVM(); } }
private void CreateAccountButton_Click(object sender, RoutedEventArgs e) { RegisterPageVM content = (RegisterPageVM)this.DataContext; NavigationService.Navigate(new LoginPage(content.window, content.Username, content.Password)); }
public RegisterCommand(RegisterPageVM viewModel) { this.viewModel = viewModel; }
public RegisterPage() { InitializeComponent(); BindingContext = new RegisterPageVM(); }