menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class NumericFocusEventArgs<T> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class NumericFocusEventArgs<T>

    Represents the event arguments for the focus event in the NumericTextBox component.

    Inheritance
    System.Object
    NumericFocusEventArgs<T>
    Namespace: Syncfusion.Blazor.Inputs
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class NumericFocusEventArgs<T> : Object
    Type Parameters
    Name Description
    T

    The type of the value in the NumericTextBox.

    Remarks

    This class is used when the NumericTextBox receives focus, providing information about the current state of the component including its value and container element reference.

    Examples
    <SfNumericTextBox @bind-Value="@numericValue" Focus="OnFocus">
    </SfNumericTextBox>
    
    @code {
        private double numericValue = 10;
    
        private void OnFocus(NumericFocusEventArgs<double> args)
        {
            Console.WriteLine($"NumericTextBox received focus with value: {args.Value}");
        }
    }

    Constructors

    NumericFocusEventArgs()

    Declaration
    public NumericFocusEventArgs()

    Properties

    Container

    Gets or sets the reference to the NumericTextBox container element.

    Declaration
    public ElementReference Container { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.ElementReference

    An Microsoft.AspNetCore.Components.ElementReference that provides access to the NumericTextBox's container DOM element.

    Remarks

    This property allows you to access the DOM element of the NumericTextBox container for advanced manipulation or interaction scenarios.

    Event

    Gets or sets the original browser event arguments that triggered the focus event.

    Declaration
    public object Event { get; set; }
    Property Value
    Type Description
    System.Object

    An System.Object containing the original event arguments, or null if not available.

    Remarks

    This property provides access to the underlying browser event object that caused the focus event, allowing access to additional event properties if needed.

    Name

    Gets or sets the name of the focus event.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    A System.String value representing the event name, or null if not specified.

    Remarks

    This property typically contains "Focus" for focus events.

    Value

    Gets or sets the current value of the NumericTextBox when the focus event occurred.

    Declaration
    public T Value { get; set; }
    Property Value
    Type Description
    T

    The current value of type T, or null if the value is empty or invalid.

    Remarks

    This property contains the value of the NumericTextBox at the time it received focus.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved