public BarcodeScanPage(BarcodeScanPageViewModel vm) { InitializeComponent(); viewModel = vm; BindingContext = viewModel; taskListViewModel = viewModel.TaskListViewModel; }
public BarCodeScanPage() { InitializeComponent(); BindingContext = new BarcodeScanPageViewModel() { Navigation = this.Navigation }; zxing.Options.CameraResolutionSelector = HandleCameraResolutionSelectorDelegate; }
public async void BarcodeIconClicked(object sender, System.EventArgs e) { List <TaskViewModel> toDoTasksList = new List <TaskViewModel>(); List <TaskViewModel> doneTasksList = new List <TaskViewModel>(); if (ViewModel.ToDoTasks != null) { toDoTasksList = new List <TaskViewModel>(ViewModel.ToDoTasks); } if (ViewModel.DoneTasks != null) { doneTasksList = new List <TaskViewModel>(ViewModel.DoneTasks); } var barcodeScanPageViewModel = new BarcodeScanPageViewModel(toDoTasksList, doneTasksList, ViewModel); await Navigation.PushAsync(new BarcodeScanPage(barcodeScanPageViewModel)); }