private async Task AddWireframe() { var viewModel = new WireframeDetailViewModel(new WireframeViewModel(), wireframeStore, pageService); viewModel.WireframeAdded += (source, wireframe) => { Wireframes.Add(new WireframeViewModel(wireframe)); }; await pageService.PushAsync(new WireframeAddPage(viewModel)); }
private async Task SelectWireframe(WireframeViewModel wireframe) { if (wireframe == null) { return; } SelectedWireframe = null; var wireframeViewModel = new WireframeDetailViewModel(wireframe, wireframeStore, pageService); wireframeViewModel.WireframeUpdated += (source, updatedWireframe) => { wireframe.WireframeId = updatedWireframe.WireframeId; wireframe.Title = updatedWireframe.Title; wireframe.Description = updatedWireframe.Description; wireframe.Date = updatedWireframe.Date; wireframe.FileName = updatedWireframe.FileName; wireframe.FileLocation = updatedWireframe.FileLocation; wireframe.FileDate = updatedWireframe.FileDate; }; await pageService.PushAsync(new WireframeDetailPage(wireframeViewModel)); }