PdfViewer.Searched Event
Occurs when the search term is found successfully.
public event SearchedEventHandler PdfViewer.Searched;
Public Event PdfViewer.Searched As SearchedEventHandler
Event Handler
Licensing Info
This event is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
Examples
This example demonstrates, how to get the count of successful search results and status of search completion using SearchedEventArgs class.Imports System
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer
Public Class Form1
Inherits System.Windows.Forms.Form
Private MyPdfViewer As PdfViewer
Sub New()
InitializeComponent()
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
AddHandler MyPdfViewer.Searched, AddressOf pdfViewer_Searched
End Sub
Private Sub pdfViewer_Searched(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.SearchedEventArgs)
' Get the status of search completion.
Dim searchStatus As SearchStatus = e.Status
' Get the count of search results found.
Dim count As Integer = e.Count
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private PdfViewer dpdfViewer;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.dpdfViewer = new PdfViewer();
this.Controls.Add(dpdfViewer);
Searched += new ceTe.DynamicPDF.Viewer.SearchedEventHandler(this.pdfViewer_Searched);
}
private void pdfViewer_Searched(object sender, ceTe.DynamicPDF.Viewer.SearchedEventArgs e)
{
// Get the status of search completion.
SearchStatus searchStatus = e.Status;
// Get the count of search results found.
int count = e.Count;
}
}
}