-api-id | -api-type |
---|---|
T:Windows.Security.Authentication.Web.Provider.WebAccountProviderAddAccountOperation |
winrt class |
Represents an add account operation.
The following demonstrates how to handle an add web account operation:
WebAccountProviderAddAccountOperation operation;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
operation = (WebAccountProviderAddAccountOperation)e.Parameter;
base.OnNavigatedTo(e);
}
private async void DoneAddAccountButton_Click(object sender, RoutedEventArgs e)
{
Dictionary<string, string> properties = new Dictionary<string, string>();
properties.Add(this.PropKeyTextBox.Text, this.PropValueTextBox.Text);
WebAccount newAccount = await WebAccountManager.AddWebAccountAsync(this.AccountIdTextBox.Text,
this.UserNameTextBox.Text, properties);
}