Class FormFieldMouseEnterEventArgs
Provides event data for the form field mouse enter event in the SfPdfViewer2 component.
Inheritance
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class FormFieldMouseEnterEventArgs : Object
Remarks
The FormFieldMouseEnterEventArgs class contains details about the form field that the mouse pointer has entered, enabling developers to access its properties and implement custom logic based on user interactions.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldMouseEnter="@OnFormFieldMouseEnter"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldMouseEnter(FormFieldMouseEnterEventArgs args)
{
// Retrieve details of the form field being mouse entered
Console.WriteLine($"Mouse entered form field: {args.Field.Name} on page {args.PageNumber}");
// Implement additional logic
}
}
Constructors
FormFieldMouseEnterEventArgs()
Declaration
public FormFieldMouseEnterEventArgs()
Properties
Field
Gets the form field object that is being mouser enter in the SfPdfViewer2 component.
Declaration
public FormFieldInfo Field { get; }
Property Value
Type | Description |
---|---|
FormFieldInfo | An instance of FormFieldInfo representing the form field currently being mouse entered. |
Remarks
This property provides access to the form field that the mouse pointer is currently hovering over, allowing you to retrieve its details and apply relevant actions.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldMouseEnter="@OnFormFieldMouseEnter"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldMouseEnter(FormFieldMouseEnterEventArgs args)
{
// Retrieve the form field being mouse entered
FormFieldInfo fieldInfo = args.Field;
Console.WriteLine($"Mouse entered form field: {fieldInfo.Name}");
// Implement additional logic
}
}
PageNumber
Gets the page number of the form field being mouse entered 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 is being mouse entered. |
Remarks
This property provides the page number associated with the form field that the mouse pointer is currently entered. It helps in identifying the exact location of the form field within the PDF document.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldMouseEnter="@OnFormFieldMouseEnter"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldMouseEnter(FormFieldMouseEnterEventArgs args)
{
// Retrieve the page number of the mouse entered form field
int pageNumber = args.PageNumber;
Console.WriteLine($"Mouse entered a form field on page: {pageNumber}");
// Implement additional logic
}
}
PageX
Gets the X-coordinate of the mouse pointer relative to the page container in the SfPdfViewer2 component.
Declaration
public double PageX { get; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the X-coordinate of the mouse pointer relative to the PDF page container. |
Remarks
The PageX
property provides the horizontal position of the mouse pointer within the PDF page container
when hovering over a form field. This helps in accurately determining the position of user interactions relative to the PDF page.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldMouseEnter="@OnFormFieldMouseEnter"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldMouseEnter(FormFieldMouseEnterEventArgs args)
{
// Retrieve the X-coordinate of the mouse within the page container
double pageX = args.PageX;
Console.WriteLine($"Mouse X position in page: {pageX}");
// Implement additional logic
}
}
PageY
Gets the Y-coordinate of the mouse pointer relative to the page container in the SfPdfViewer2 component.
Declaration
public double PageY { get; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the Y-coordinate of the mouse pointer relative to the PDF page container. |
Remarks
The PageY
property provides the vertical position of the mouse pointer within the PDF page container
when hovering over a form field. This helps in accurately determining user interactions within a specific PDF page.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldMouseEnter="@OnFormFieldMouseEnter"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldMouseEnter(FormFieldMouseEnterEventArgs args)
{
// Retrieve the Y-coordinate of the mouse within the page container
double pageY = args.PageY;
Console.WriteLine($"Mouse Y position in page: {pageY}");
// Implement additional logic
}
}
X
Gets the X-coordinate of the mouse pointer relative to the viewer container in the SfPdfViewer2 component.
Declaration
public double X { get; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the X-coordinate of the mouse pointer relative to the PDF viewer container. |
Remarks
The X
property provides the horizontal position of the mouse pointer within the PDF viewer container
when hovering over a form field. This is useful for positioning custom tooltips, context menus, or handling
other interactions relative to the viewer.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldMouseEnter="@OnFormFieldMouseEnter"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldMouseEnter(FormFieldMouseEnterEventArgs args)
{
// Retrieve the X-coordinate of the mouse within the viewer container
double viewerX = args.X;
Console.WriteLine($"Mouse X position in viewer: {viewerX}");
// Implement additional logic
}
}
Y
Gets the Y-coordinate of the mouse pointer relative to the viewer container in the SfPdfViewer2 component.
Declaration
public double Y { get; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the Y-coordinate of the mouse pointer relative to the viewer container. |
Remarks
The Y
property provides the vertical position of the mouse pointer within the PDF Viewer container
when hovering over a form field. This helps determine the exact interaction position relative to the entire viewer.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents FormFieldMouseEnter="@OnFormFieldMouseEnter"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldMouseEnter(FormFieldMouseEnterEventArgs args)
{
// Retrieve the Y-coordinate of the mouse within the viewer container
double viewerY = args.Y;
Console.WriteLine($"Mouse Y position in viewer: {viewerY}");
// Implement additional logic
}
}