Click or drag to resize

CredentialDialogShowDialog Method

Shows the credentials dialog as a modal dialog.

Namespace:  Ookii.Dialogs
Assembly:  Ookii.Dialogs (in Ookii.Dialogs.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public DialogResult ShowDialog()

Return Value

Type: DialogResult
OK if the user clicked OK; otherwise, Cancel.
Exceptions
ExceptionCondition
CredentialExceptionAn error occurred while showing the credentials dialog.
InvalidOperationExceptionTarget is an empty string ("").
Remarks

The credentials dialog will not be shown if one of the following conditions holds:

  • UseApplicationInstanceCredentialCache is and the application instance credential cache contains credentials for the specified Target, even if ShowUIForSavedCredentials is .
  • ShowSaveCheckBox is , ShowUIForSavedCredentials is , and the operating system credential store for the current user contains credentials for the specified Target.

In these cases, the Credentials, UserName and Password properties will be set to the saved credentials and this function returns immediately, returning OK.

If the ShowSaveCheckBox property is , you should call ConfirmCredentials(Boolean) after validating if the provided credentials are correct.

See Also