Class FormFieldPropertyChangedEventArgs
Provides event data for the form field property change event in the SfPdfViewer2 component.
Inheritance
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class FormFieldPropertyChangedEventArgs : Object
Remarks
The FormFieldPropertyChangedEventArgs class contains information about the form field whose properties have changed, along with a list of the specific properties that were modified. This allows developers to track and respond to changes in form field properties within the PDF viewer.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldPropertyChanged="@OnFormFieldPropertyChanged"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldPropertyChanged(FormFieldPropertyChangedEventArgs args)
{
// Retrieve the changed properties
Console.WriteLine($"Form field properties changed: {string.Join(", ", args.ChangedProperties)}");
// Implement additional logic based on property changes
}
}
Constructors
FormFieldPropertyChangedEventArgs()
Declaration
public FormFieldPropertyChangedEventArgs()
Properties
ChangedProperties
Gets the list of form field properties that have changed in the SfPdfViewer2 component.
Declaration
public List<string> ChangedProperties { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | A list of System.String representing the names of the form field properties that have changed. |
Remarks
The ChangedProperties property provides a collection of property names that were modified in the form field within the SfPdfViewer2 component. This allows developers to track specific changes and apply necessary logic accordingly.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldPropertyChanged="@OnFormFieldPropertyChanged"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldPropertyChanged(FormFieldPropertyChangedEventArgs args)
{
Console.WriteLine($"Form field '{args.NewValue.Name}' was updated.");
foreach (string propertyName in args.ChangedProperties)
{
Console.WriteLine($"Property '{propertyName}' changed.");
}
// Implement additional logic based on the changed properties
}
}
NewValue
Gets the updated state of the form field after the property change in the SfPdfViewer2 component.
Declaration
public FormFieldInfo NewValue { get; }
Property Value
Type | Description |
---|---|
FormFieldInfo | An instance of FormFieldInfo representing the form field state after the change. |
Remarks
The NewValue property provides access to the form field modified state after changes have been applied. This allows developers to compare the old and new properties when handling changes in the SfPdfViewer2 component.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldPropertyChanged="@OnFormFieldPropertyChanged"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldPropertyChanged(FormFieldPropertyChangedEventArgs args)
{
Console.WriteLine($"Form field '{args.NewValue.Name}' was updated.");
foreach (string propertyName in args.ChangedProperties)
{
Console.WriteLine($"Property '{propertyName}' changed.");
}
// Implement additional logic based on the new state
}
}
OldValue
Gets the previous state of the form field before the property change in the SfPdfViewer2 component.
Declaration
public FormFieldInfo OldValue { get; }
Property Value
Type | Description |
---|---|
FormFieldInfo | An instance of FormFieldInfo representing the form field state before the change. |
Remarks
The OldValue property provides access to the form field previous state before any modifications occurred. This allows developers to compare the field's old and new properties when handling changes in the SfPdfViewer2 component.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldPropertyChanged="@OnFormFieldPropertyChanged"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldPropertyChanged(FormFieldPropertyChangedEventArgs args)
{
Console.WriteLine($"Form field '{args.OldValue.Name}' had its properties changed.");
foreach (string propertyName in args.ChangedProperties)
{
Console.WriteLine($"Property '{propertyName}' changed.");
}
// Implement additional logic based on the previous state
}
}