In a Metro Style app, I would like to use the WinRT provided CredentialPicker, mainly in order to provide a consistent look and feel for the user. However I only need a password, and not a username and password.
Is it possible to somehow hide the “User Name” entry box (as well as the user icon), but keep all other functionality when using Basic authentication?
Bascially I would like to have something like this:
using Windows.Security.Credentials.UI;
async Task<string> GetPassword() {
CredentialPickerOptions options = new CredentialPickerOptions();
options.ShowUsernameEntry = false; // Error: No such API
var result = await CredentialPicker.PickAsync(options);
return result.CredentialPassword;
}
Any ideas?
The answer is no. you can’t do that.