Class RadzenLogin
RadzenLogin component. Must be placed in RadzenTemplateForm.
Implements
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenLogin : RadzenComponent, IDisposable
Examples
<RadzenTemplateForm Data=@("Login")>
<RadzenLogin AllowRegister="true" AllowResetPassword="true"
Login=@OnLogin
ResetPassword=@OnResetPassword
Register=@OnRegister />
</RadzenTemplateForm>
@code {
void OnLogin(LoginArgs args, string name)
{
Console.WriteLine($"{name} -> Username: {args.Username} and password: {args.Password}");
}
void OnRegister(string name)
{
Console.WriteLine($"{name} -> Register");
}
void OnResetPassword(string value, string name)
{
Console.WriteLine($"{name} -> ResetPassword for user: {value}");
}
}
Properties
AllowRegister
Gets or sets a value indicating whether register is allowed.
Declaration
public bool AllowRegister { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AllowRememberMe
Asks the user whether to remember their credentials. Set to false
by default.
Declaration
public bool AllowRememberMe { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AllowResetPassword
Gets or sets a value indicating whether reset password is allowed.
Declaration
public bool AllowResetPassword { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AutoComplete
Gets or sets a value indicating whether automatic complete of inputs is enabled.
Declaration
public bool AutoComplete { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
FormFieldVariant
Gets or sets the design variant of the form field.
Declaration
public Variant? FormFieldVariant { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Variant> | The variant of the form field. |
Login
Gets or sets the login callback.
Declaration
public EventCallback<LoginArgs> Login { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<LoginArgs> | The login callback. |
LoginText
Gets or sets the login text.
Declaration
public string LoginText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The login text. |
Password
Gets or sets the password.
Declaration
public string Password { get; set; }
Property Value
Type | Description |
---|---|
System.String | The password. |
PasswordAutoCompleteType
Gets or sets a value indicating the type of built-in autocomplete the browser should use. AutoCompleteType
Declaration
public AutoCompleteType PasswordAutoCompleteType { get; set; }
Property Value
Type | Description |
---|---|
AutoCompleteType | The type of built-in autocomplete. |
PasswordRequired
Gets or sets the password required.
Declaration
public string PasswordRequired { get; set; }
Property Value
Type | Description |
---|---|
System.String | The password required. |
PasswordText
Gets or sets the password text.
Declaration
public string PasswordText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The password text. |
Register
Gets or sets the register callback.
Declaration
public EventCallback Register { get; set; }
Property Value
Type | Description |
---|---|
EventCallback | The register callback. |
RegisterMessageText
Gets or sets the register message text.
Declaration
public string RegisterMessageText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The register message text. |
RegisterText
Gets or sets the register text.
Declaration
public string RegisterText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The register text. |
RememberMe
Sets the initial value of the remember me switch.
Declaration
public bool RememberMe { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
RememberMeText
Gets or sets the remember me text.
Declaration
public string RememberMeText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ResetPassword
Gets or sets the reset password callback.
Declaration
public EventCallback<string> ResetPassword { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.String> | The reset password callback. |
ResetPasswordText
Gets or sets the reset password text.
Declaration
public string ResetPasswordText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The reset password text. |
ShowLoginButton
Gets or sets a value indicating whether default login button is shown.
Declaration
public bool ShowLoginButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Username
Gets or sets the username.
Declaration
public string Username { get; set; }
Property Value
Type | Description |
---|---|
System.String | The username. |
UserNameAutoCompleteType
Gets or sets a value indicating the type of built-in autocomplete the browser should use. AutoCompleteType
Declaration
public AutoCompleteType UserNameAutoCompleteType { get; set; }
Property Value
Type | Description |
---|---|
AutoCompleteType | The type of built-in autocomplete. |
UserRequired
Gets or sets the user required text.
Declaration
public string UserRequired { get; set; }
Property Value
Type | Description |
---|---|
System.String | The user required text. |
UserText
Gets or sets the user text.
Declaration
public string UserText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The user text. |
Methods
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
System.String |
Overrides
OnInitialized()
Called by the Blazor runtime.
Declaration
protected override void OnInitialized()
Overrides
OnLogin()
Called when login.
Declaration
protected async Task OnLogin()
Returns
Type | Description |
---|---|
Task |
OnRegister()
Called when register.
Declaration
protected async Task OnRegister()
Returns
Type | Description |
---|---|
Task |
OnReset(EventArgs)
Handles the Reset event.
Declaration
protected async Task OnReset(EventArgs args)
Parameters
Type | Name | Description |
---|---|---|
EventArgs | args | The |
Returns
Type | Description |
---|---|
Task |
SetParametersAsync(ParameterView)
Called by the Blazor runtime when parameters are set.
Declaration
public override async Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task |