Class FormFieldUnselectedEventArgs
Provides event data for the form field unselected event in the SfPdfViewer2 component.
Inheritance
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class FormFieldUnselectedEventArgs : Object
Remarks
The FormFieldUnselectedEventArgs class contains details about the form field that was unselected. Developers can use this information to implement custom logic when a form field is deselected.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldUnselected="@OnFormFieldUnselected"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldUnselected(FormFieldUnselectedEventArgs args)
{
// Retrieve the unselected form field
FormFieldInfo fieldInfo = args.Field;
Console.WriteLine($"Form field unselected: {fieldInfo.Name}");
// Implement additional logic
}
}
Constructors
FormFieldUnselectedEventArgs()
Declaration
public FormFieldUnselectedEventArgs()
Properties
Field
Gets the form field object that was unselected in the SfPdfViewer2 component.
Declaration
public FormFieldInfo Field { get; }
Property Value
Type | Description |
---|---|
FormFieldInfo | An instance of FormFieldInfo representing the unselected form field. |
Remarks
The Field property provides access to the form field that was previously selected but has now been deselected. This allows you to retrieve its details and take necessary actions when a form field is unselected.
Examples
<SfPdfViewer2 @ref="Viewer" DocumentPath="@DocumentPath" Height="100%" Width="100%">
<PdfViewerEvents FormFieldUnselected="@OnFormFieldUnselected"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldUnselected(FormFieldUnselectedEventArgs args)
{
// Retrieve the unselected form field
FormFieldInfo fieldInfo = args.Field;
Console.WriteLine($"Form field unselected: {fieldInfo.Name}");
// Implement additional logic
}
}
PageNumber
Gets the page number where the form field was unselected in the SfPdfViewer2 component.
Declaration
public int PageNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 | An System.Int32 representing the page number where the form field was unselected. |
Remarks
This property provides the page number associated with the form field that was unselected,
allowing you to identify its location within the document.
Examples
<SfPdfViewer2 @ref="Viewer" DocumentPath="@DocumentPath" Height="100%" Width="100%">
<PdfViewerEvents FormFieldUnselected="@OnFormFieldUnselected"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldUnselected(FormFieldUnselectedEventArgs args)
{
// Retrieve the page number where the form field was unselected
int pageNumber = args.PageNumber;
Console.WriteLine($"Form field unselected on page: {pageNumber}");
// Implement additional logic
}
}