public PasswordDialogClosedEventArgs(PasswordDialog.Result dialogResult) { DialogResult = dialogResult; }
private async Task<string> GetPassword() { #if WINDOWS_PHONE_APP PasswordDialog dialog = new PasswordDialog(); var result = await dialog.ShowAsync(); if(result == ContentDialogResult.Primary) { return dialog.Password; } else { return null; } #elif WINDOWS_UWP return null; #else PasswordDialog dialog = new PasswordDialog {IsOpen = true}; if ((await dialog.WhenClosed()).DialogResult == PasswordDialog.Result.Ok) { return dialog.Password; } else { return null; } #endif }