private async void AddDocument() { var option = await mMessageboxService.ShowThreeOptions("Add document", "Please choose an option", "Cancel", "Take photo", "Select from library"); if (option > 0) { byte[] image; if (option == 1) { image = await Mvx.Resolve <IImageService>().TakePicture(); } else { image = await Mvx.Resolve <IImageService>().SelectFromLibrary(); } if (image != null) { var path = Guid.NewGuid().ToString(); Document document = new Document { }; DocumentItemViewModel itemModel = new DocumentItemViewModel(document); DocumentItems.Add(itemModel); } } }
public void AddItem() { var ret = new DocumentItemViewModel(); Items.Add(ret); SelectedItem = ret; }
private void SelectDocumenItem(DocumentItemViewModel documentItem) { //mCacheService.DocumentItems = this.DocumentItems; //mCacheService.DocumentItem = documentItem; ShowViewModel <DocumentDetailsViewModel>(new { canEdit = mCanEdit }); }