Created
January 31, 2019 13:07
-
-
Save MartinZikmund/988de298f4955fb3a2ffeaec987548c4 to your computer and use it in GitHub Desktop.
Explain user what is happening
This file contains 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
//explain the issue | |
MessageDialog requestPermissionDialog = | |
new MessageDialog($"The app needs to access the {library}. " + | |
"Press OK to open system settings and give this app permission. " + | |
"If the app closes, reopen it afterwards. " + | |
"If you Cancel, the app will have limited functionality only."); | |
//setup dialog commands | |
var okCommand = new UICommand("OK"); | |
requestPermissionDialog.Commands.Add(okCommand); | |
var cancelCommand = new UICommand("Cancel"); | |
requestPermissionDialog.Commands.Add(cancelCommand); | |
requestPermissionDialog.DefaultCommandIndex = 0; | |
requestPermissionDialog.CancelCommandIndex = 1; | |
//display to user | |
var requestPermissionResult = await requestPermissionDialog.ShowAsync(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment