Back to Devexpress

Password Recovery Form

windowsforms-404069-ui-templates-forms-password-recovery-form.md

latest1.9 KB
Original Source

Password Recovery Form

  • Nov 21, 2022

The Password Recovery Form (PasswordRecoveryForm) is used to recover user passwords. It uses the email address associated with an account.

What’s Inside

The Password Form includes the following UI components that ship as part of the DevExpress UI Templates:

Show Password Recovery Form

The following example demonstrates how to show the Password Recovery Form. Use the PassordRecoveryForm.Email property to obtain the email address to which you can send an email with a recovery link.

csharp
using DevExpress.UITemplates.Collection.Forms;

// ...
using(var frm = new PasswordRecoveryForm()) {
    if(frm.ShowDialog() == DialogResult.OK) {
        string recoveryEmail = frm.Email;
    }
}

Form Title, Description, and Button Caption

Use the following properties of the form’s ViewModel to personalize its title, description, and button:

  • Title - the form’s title.

  • Subject - the form’s description.

  • Action - the button’s caption.

  • C#

csharp
public partial class PasswordForm : HtmlFormBase {
    // ...
    public class ViewModel {
        public string Title {
            get { return "Account Recovery"; }
        }
        public string Subject {
            get { return "Recover your account"; }
        }
        public string Action {
            get { return "Reset Password"; }
        }
        // ...
    }
}

See Also

Email Editor

Password Form