Class ChangeEventArgs<T>
Represents the event arguments for the value change event in the NumericTextBox component.
Inheritance
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 |
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 |
|
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 |
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 |
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 |
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.