menu

Blazor

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

    Show / Hide Table of Contents

    Class ChangeEventArgs<T>

    Represents the event arguments for the value change event in the NumericTextBox component.

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

    The type of the value that changed in the NumericTextBox.

    Remarks

    This class provides detailed information about the change event, including the previous and current values, whether the change was triggered by user interaction, and the original event arguments.

    Examples
    <SfNumericTextBox @bind-Value="@numericValue" ValueChange="OnValueChange">
    </SfNumericTextBox>
    
    @code {
        private double numericValue = 10;
    
        private void OnValueChange(ChangeEventArgs<double> args)
        {
            Console.WriteLine($"Previous Value: {args.PreviousValue}");
            Console.WriteLine($"Current Value: {args.Value}");
            Console.WriteLine($"Is User Interaction: {args.IsInteracted}");
        }
    }

    Constructors

    ChangeEventArgs()

    Declaration
    public ChangeEventArgs()

    Properties

    Event

    Gets or sets the original event arguments that triggered the change event.

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

    An System.EventArgs object containing the original event information, or null if not available.

    Remarks

    This property provides access to the underlying event arguments from the browser's change event. It can be used to access additional event details if needed.

    IsInteracted

    Gets or sets a value indicating whether the change was triggered by user interaction.

    Declaration
    public bool IsInteracted { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the value change was caused by user interaction (such as typing or clicking spin buttons); otherwise, false if changed programmatically.

    Remarks

    This property helps distinguish between programmatic value changes and user-initiated changes, which can be useful for implementing different behaviors based on the source of the change.

    Name

    Gets or sets the name of the 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 the name of the specific event that was triggered, such as "ValueChange" for value change events.

    PreviousValue

    Gets or sets the previous value of the NumericTextBox before the change occurred.

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

    The previous value of type T, or null if there was no previous value.

    Remarks

    This property allows you to compare the old and new values to determine the magnitude of the change or to implement undo functionality.

    Value

    Gets or sets the current value of the NumericTextBox after the change.

    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 new value after the change event has occurred. The value type depends on the generic type parameter specified for the NumericTextBox.

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