public LoginPage(TadoController model) { void ExitPage() => Navigation.PopAsync(); _viewModel = new LoginPageViewModel(ExitPage, model); BindingContext = _viewModel; InitializeComponent(); }
public LoginPageViewModel(Action exitPage, TadoController model) { _exitPage = exitPage; _model = model; Username = model.Username; Password = model.Password; _loginCommand = new Command(LoginButtonClick, IsLoginSupplied); }