Class FormFieldFocusOutEventArgs
Provides event data for the form field focus-out event in the SfPdfViewer2 component.
Inheritance
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class FormFieldFocusOutEventArgs : Object
Remarks
The FormFieldFocusOutEventArgs class contains details about the form field that lost focus. Developers can use this information to retrieve field properties and execute necessary actions when the user navigates away from the field.
Examples
<SfPdfViewer2 @ref="Viewer" DocumentPath="@DocumentPath" Height="100%" Width="100%">
<PdfViewerEvents FormFieldFocusOut="@OnFormFieldFocusOut"></PdfViewerEvents>
</SfPdfViewer2>
@code {
SfPdfViewer2 Viewer;
void OnFormFieldFocusOut(FormFieldFocusOutEventArgs args)
{
// Access details of the form field that lost focus
FormFieldInfo fieldInfo = args.Field;
Console.WriteLine($"Form field focus lost: {fieldInfo.Name}");
// Implement additional logic
}
}
Constructors
FormFieldFocusOutEventArgs()
Declaration
public FormFieldFocusOutEventArgs()
Properties
Field
Gets the form field object that lost focus in the SfPdfViewer2 component.
Declaration
public FormFieldInfo Field { get; }
Property Value
Type | Description |
---|---|
FormFieldInfo | An instance of FormFieldInfo representing the form field that lost focus. |
Remarks
This property provides access to the form field that was last interacted with before losing focus. It allows you to retrieve field details and perform necessary actions when focus is lost.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldFocusOut="@OnFormFieldFocusOut"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldFocusOut(FormFieldFocusOutEventArgs args)
{
// Retrieve the form field that lost focus
FormFieldInfo fieldInfo = args.Field;
Console.WriteLine($"Form field focus lost: {fieldInfo.Name}");
// Implement additional logic
}
}
PageNumber
Gets the page number where the form field lost focus 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 lost focus. |
Remarks
This property provides the page number associated with the form field that lost focus, allowing you to determine its exact location within the document.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldFocusOut="@OnFormFieldFocusOut"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldFocusOut(FormFieldFocusOutEventArgs args)
{
// Retrieve the page number where the form field lost focus
int pageNumber = args.PageNumber;
Console.WriteLine($"Form field lost focus on page: {pageNumber}");
// Implement additional logic
}
}