Created
August 19, 2012 12:06
-
-
Save JakeGinnivan/3394532 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var save = new ButtonExtras(ButtonType.Custom, "Save", "Saves this modified post to your blog"); | |
| var saveAs = new ButtonExtras(ButtonType.Custom, "Save As", "Saves this blog post as a local markdown file"); | |
| var publish = new ButtonExtras(ButtonType.Custom, "Publish As", "Publishes this post to another blog, or as another post"); | |
| dialogService.ShowConfirmationWithCancel("Markpad", "What do you want to do?", "", save, saveAs, publish); | |
| if (save.WasClicked) | |
| return base.Publish(); | |
| if (saveAs.WasClicked) | |
| return SaveAs(); | |
| if (publish.WasClicked) | |
| return DocumentFactory.PublishDocument(this); | |
| return TaskEx.FromResult<IMarkpadDocument>(this); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the dialogservice call doesn't return the dialog result. It consumes it and changes it to a bool. This scenario was thought of, but not fully implemented.
Also the dialog service was a bit of an experiment on my part and you're suffering the consequences of a poorly thought out API surface. Sorry.