public MvvmEnforcementModal() { InitializeComponent(); MvvmLittleViewModal viewModel = new MvvmLittleViewModal(); BindingContext = viewModel; // Populate Picker Items list. foreach (string language in viewModel.Languages) { picker.Items.Add(language); } }
protected override bool OnBackButtonPressed() { MvvmLittleViewModal viewModel = (MvvmLittleViewModal)BindingContext; return(viewModel.IsValid ? base.OnBackButtonPressed() : true); }