Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.28 KB

webaccountprovideraddaccountoperation.md

File metadata and controls

41 lines (30 loc) · 1.28 KB
-api-id -api-type
T:Windows.Security.Authentication.Web.Provider.WebAccountProviderAddAccountOperation
winrt class

Windows.Security.Authentication.Web.Provider.WebAccountProviderAddAccountOperation

-description

Represents an add account operation.

-remarks

-examples

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);
}

-see-also

IWebAccountProviderOperation