public ProjectTrackerPage() { InitializeComponent(); var vm = new ProjectTrackerViewModel(new FormsTimer()); BindingContext = vm; Projects.ItemTapped += (sender, e) => { vm.ToggleProjectCommand.Execute(e.Item); Projects.SelectedItem = null; }; }
private ProjectTrackerViewModel getViewModel(params string[] projectNames) { var viewModel = new ProjectTrackerViewModel(timer); foreach (string name in projectNames) { viewModel.NewProjectName = name; viewModel.AddCommand.Execute(null); } ; return(viewModel); }
private ProjectTrackerViewModel getViewModel(params string[] projectNames) { var viewModel = new ProjectTrackerViewModel(_timer); foreach (var projectName in projectNames) { viewModel.NewProjectName = projectName; viewModel.AddCommand.Execute(null); } return viewModel; }