Click or drag to resize

CredentialDialog Class

Represents a dialog box that allows the user to enter generic credentials.
Inheritance Hierarchy

Namespace:  Ookii.Dialogs
Assembly:  Ookii.Dialogs (in Ookii.Dialogs.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class CredentialDialog : Component

The CredentialDialog type exposes the following members.

Constructors
  NameDescription
Public methodCredentialDialog
Initializes a new instance of the CredentialDialog class.
Public methodCredentialDialog(IContainer)
Initializes a new instance of the CredentialDialog class with the specified container.
Top
Properties
  NameDescription
Protected propertyCanRaiseEvents
Gets a value indicating whether the component can raise an event.
(Inherited from Component.)
Public propertyContainer
Gets the IContainer that contains the Component.
(Inherited from Component.)
Public propertyContent
Gets or sets additional text to display in the dialog.
Public propertyCredentials
Gets the user-specified user name and password in a NetworkCredential object.
Protected propertyDesignMode
Gets a value that indicates whether the Component is currently in design mode.
(Inherited from Component.)
Public propertyDownlevelTextMode
Gets or sets a value that indicates how the text of the MainInstruction and Content properties is displayed on Windows XP.
Protected propertyEvents
Gets the list of event handlers that are attached to this Component.
(Inherited from Component.)
Public propertyIsSaveChecked
Gets or sets whether the "save password" checkbox is checked.
Public propertyIsStoredCredential
Gets a value that indicates whether the current credentials were retrieved from a credential store.
Public propertyMainInstruction
Gets or sets a brief message to display in the dialog box.
Public propertyPassword
Gets the password the user entered in the dialog.
Public propertyShowSaveCheckBox
Gets or sets a value that indicates whether a check box is shown on the dialog that allows the user to choose whether to save the credentials or not.
Public propertyShowUIForSavedCredentials
Gets or sets a value that indicates whether the dialog should be displayed even when saved credentials exist for the specified target.
Public propertySite
Gets or sets the ISite of the Component.
(Inherited from Component.)
Public propertyTarget
Gets or sets the target for the credentials, typically a server name.
Public propertyUseApplicationInstanceCredentialCache
Gets or sets whether to use the application instance credential cache.
Public propertyUserName
Gets the user name the user entered in the dialog.
Public propertyWindowTitle
Gets or sets the title of the credentials dialog.
Top
Methods
  NameDescription
Public methodConfirmCredentials
Confirms the validity of the credential provided by the user.
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodStatic memberDeleteCredential
Deletes the credentials for the specified target.
Public methodDispose
Releases all resources used by the Component.
(Inherited from Component.)
Protected methodDispose(Boolean)
Clean up any resources being used.
(Overrides ComponentDispose(Boolean).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.
(Inherited from Component.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetService
Returns an object that represents a service provided by the Component or by its Container.
(Inherited from Component.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected methodOnPasswordChanged
Raises the PasswordChanged event.
Protected methodOnUserNameChanged
Raises the UserNameChanged event.
Public methodStatic memberRetrieveCredential
Retrieves credentials for the specified target from the operating system's credential store for the current user.
Public methodStatic memberRetrieveCredentialFromApplicationInstanceCache
Tries to get the credentials for the specified target from the application instance credential cache.
Public methodShowDialog
Shows the credentials dialog as a modal dialog.
Public methodShowDialog(IWin32Window)
Shows the credentials dialog as a modal dialog with the specified owner.
Public methodStatic memberStoreCredential
Stores the specified credentials in the operating system's credential store for the currently logged on user.
Public methodToString
Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component.)
Top
Events
  NameDescription
Public eventDisposed
Occurs when the component is disposed by a call to the Dispose method.
(Inherited from Component.)
Public eventPasswordChanged
Event raised when the Password property changes.
Public eventUserNameChanged
Event raised when the UserName property changes.
Top
Remarks

This class is meant for generic credentials; it does not provide access to all the functionality of the Windows CredUI API. Features such as Windows domain credentials or alternative security providers (e.g. smartcards or biometric devices) are not supported.

The CredentialDialog class provides methods for storing and retrieving credentials, and also manages automatic persistence of credentials by using the "Save password" checkbox on the credentials dialog. To specify the target for which the credentials should be saved, set the Target property.

Note Note
This class requires Windows XP or later.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also