Click or drag to resize

CredentialDialogShowDialog Method (Window)

Shows the credentials dialog as a modal dialog with the specified owner.

Namespace:  Ookii.Dialogs.Wpf
Assembly:  Ookii.Dialogs.Wpf (in Ookii.Dialogs.Wpf.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public bool ShowDialog(
	Window owner
)

Parameters

owner
Type: System.WindowsWindow
The Window that owns the credentials dialog.

Return Value

Type: Boolean
if the user clicked OK; otherwise, .
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 .

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

See Also