PdfViewer.Searched Event
Occurs when the search term is found successfully.
public event SearchedEventHandler PdfViewer.Searched;
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.
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;
}
}
}