Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenLogin

    RadzenLogin component. Must be placed in RadzenTemplateForm.

    Inheritance
    object
    ComponentBase
    RadzenComponent
    RadzenLogin
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(MouseEventArgs)
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, int)
    RadzenComponent.OnAfterRenderAsync(bool)
    RadzenComponent.RaiseContextMenu(MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.Dispose()
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.CurrentStyle
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenLogin : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, 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}");
      }
    }

    Constructors

    RadzenLogin()

    RadzenLogin component. Must be placed in RadzenTemplateForm.

    Declaration
    public RadzenLogin()
    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
    [Parameter]
    public bool AllowRegister { get; set; }
    Property Value
    Type Description
    bool

    true if register is allowed; otherwise, false.

    AllowRememberMe

    Asks the user whether to remember their credentials. Set to false by default.

    Declaration
    [Parameter]
    public bool AllowRememberMe { get; set; }
    Property Value
    Type Description
    bool

    AllowResetPassword

    Gets or sets a value indicating whether reset password is allowed.

    Declaration
    [Parameter]
    public bool AllowResetPassword { get; set; }
    Property Value
    Type Description
    bool

    true if reset password is allowed; otherwise, false.

    AutoComplete

    Gets or sets a value indicating whether automatic complete of inputs is enabled.

    Declaration
    [Parameter]
    public bool AutoComplete { get; set; }
    Property Value
    Type Description
    bool

    true if automatic complete of inputs is enabled; otherwise, false.

    FormFieldVariant

    Gets or sets the design variant of the form field.

    Declaration
    [Parameter]
    public Variant? FormFieldVariant { get; set; }
    Property Value
    Type Description
    Variant?

    The variant of the form field.

    Login

    Gets or sets the login callback.

    Declaration
    [Parameter]
    public EventCallback<LoginArgs> Login { get; set; }
    Property Value
    Type Description
    EventCallback<LoginArgs>

    The login callback.

    LoginText

    Gets or sets the login text.

    Declaration
    [Parameter]
    public string LoginText { get; set; }
    Property Value
    Type Description
    string

    The login text.

    Password

    Gets or sets the password.

    Declaration
    [Parameter]
    public string Password { get; set; }
    Property Value
    Type Description
    string

    The password.

    PasswordAutoCompleteType

    Gets or sets a value indicating the type of built-in autocomplete the browser should use. AutoCompleteType

    Declaration
    [Parameter]
    public AutoCompleteType PasswordAutoCompleteType { get; set; }
    Property Value
    Type Description
    AutoCompleteType

    The type of built-in autocomplete.

    PasswordRequired

    Gets or sets the password required.

    Declaration
    [Parameter]
    public string PasswordRequired { get; set; }
    Property Value
    Type Description
    string

    The password required.

    PasswordText

    Gets or sets the password text.

    Declaration
    [Parameter]
    public string PasswordText { get; set; }
    Property Value
    Type Description
    string

    The password text.

    Register

    Gets or sets the register callback.

    Declaration
    [Parameter]
    public EventCallback Register { get; set; }
    Property Value
    Type Description
    EventCallback

    The register callback.

    RegisterMessageText

    Gets or sets the register message text.

    Declaration
    [Parameter]
    public string RegisterMessageText { get; set; }
    Property Value
    Type Description
    string

    The register message text.

    RegisterText

    Gets or sets the register text.

    Declaration
    [Parameter]
    public string RegisterText { get; set; }
    Property Value
    Type Description
    string

    The register text.

    RememberMe

    Sets the initial value of the remember me switch.

    Declaration
    [Parameter]
    public bool RememberMe { get; set; }
    Property Value
    Type Description
    bool

    RememberMeText

    Gets or sets the remember me text.

    Declaration
    [Parameter]
    public string RememberMeText { get; set; }
    Property Value
    Type Description
    string

    ResetPassword

    Gets or sets the reset password callback.

    Declaration
    [Parameter]
    public EventCallback<string> ResetPassword { get; set; }
    Property Value
    Type Description
    EventCallback<string>

    The reset password callback.

    ResetPasswordText

    Gets or sets the reset password text.

    Declaration
    [Parameter]
    public string ResetPasswordText { get; set; }
    Property Value
    Type Description
    string

    The reset password text.

    ShowLoginButton

    Gets or sets a value indicating whether default login button is shown.

    Declaration
    [Parameter]
    public bool ShowLoginButton { get; set; }
    Property Value
    Type Description
    bool

    true if default login button is shown; otherwise, false.

    UserNameAutoCompleteType

    Gets or sets a value indicating the type of built-in autocomplete the browser should use. AutoCompleteType

    Declaration
    [Parameter]
    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
    [Parameter]
    public string UserRequired { get; set; }
    Property Value
    Type Description
    string

    The user required text.

    UserText

    Gets or sets the user text.

    Declaration
    [Parameter]
    public string UserText { get; set; }
    Property Value
    Type Description
    string

    The user text.

    Username

    Gets or sets the username.

    Declaration
    [Parameter]
    public string Username { get; set; }
    Property Value
    Type Description
    string

    The username.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    RadzenLogin component. Must be placed in RadzenTemplateForm.

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    string
    Overrides
    RadzenComponent.GetComponentCssClass()

    OnInitialized()

    Called by the Blazor runtime.

    Declaration
    protected override void OnInitialized()
    Overrides
    RadzenComponent.OnInitialized()

    OnLogin()

    Called when login.

    Declaration
    protected Task OnLogin()
    Returns
    Type Description
    Task

    OnRegister()

    Called when register.

    Declaration
    protected Task OnRegister()
    Returns
    Type Description
    Task

    OnReset(EventArgs)

    Handles the Reset event.

    Declaration
    protected Task OnReset(EventArgs args)
    Parameters
    Type Name Description
    EventArgs args

    The EventArgs instance containing the event data.

    Returns
    Type Description
    Task

    SetParametersAsync(ParameterView)

    Called by the Blazor runtime when parameters are set.

    Declaration
    public override Task SetParametersAsync(ParameterView parameters)
    Parameters
    Type Name Description
    ParameterView parameters

    The parameters.

    Returns
    Type Description
    Task
    Overrides
    RadzenComponent.SetParametersAsync(ParameterView)

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT