PdfViewer.SearchDialogShowing Event
Occurs when the search dialog is being displayed.
public event SearchDialogShowingEventHandler PdfViewer.SearchDialogShowing;
Public Event PdfViewer.SearchDialogShowing As SearchDialogShowingEventHandler
Event Handler
SearchDialogShowingEventHandler
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 shows, how to hide the search dialog and set the match option for search using SearchDialogShowing event.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.SearchDialogShowing, AddressOf MyPdfViewer_SearchDialogShowing
End Sub
Private Sub MyPdfViewer_SearchDialogShowing(ByVal sender As Object, ByVal e As ceTe.DynamicPDF.Viewer.SearchDialogShowingEventArgs)
' Hide the search dialog.
e.Cancel = True
' Set the match option for search
e.MatchOption = MatchOptions.WholeWordOnly
End Sub
End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;
namespace DynamicPDFViewerDemo
{
public class Form1 : System.Windows.Forms.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);
SearchDialogShowing += new ceTe.DynamicPDF.Viewer.SearchDialogShowingEventHandler(this.pdfViewer_SearchDialogShowing);
}
private void pdfViewer_SearchDialogShowing(object sender, ceTe.DynamicPDF.Viewer.SearchDialogShowingEventArgs e)
{
// Hide the search dialog.
e.Cancel = true;
// Set the match option for search
e.MatchOption = MatchOptions.WholeWordOnly;
}
}
}