wpf-devexpress-dot-xpf-dot-pdfviewer-dot-pdfviewercontrol-a8c0c8c2.md
Gets or sets where the PDF Viewer continues its search after you scroll a document.
Namespace : DevExpress.Xpf.PdfViewer
Assembly : DevExpress.Xpf.PdfViewer.v25.2.dll
NuGet Package : DevExpress.Wpf.PdfViewer
public PdfContinueSearchFrom ContinueSearchFrom { get; set; }
Public Property ContinueSearchFrom As PdfContinueSearchFrom
| Type | Description |
|---|---|
| PdfContinueSearchFrom |
A PdfContinueSearchFrom enumeration value. The default is CurrentPage.
|
Available values:
| Name | Description |
|---|---|
| CurrentPage |
The PDF Viewer continues its search from the current page.
| | LastSearchResult |
The PDF Viewer continues its search from its last search result.
|
The following code snippet shows how to scroll your document to a specific page and continue your search from this page.
pdfViewer.DocumentLoaded += (s, e) =>
{
// Specify that your search should always continue from the current page.
pdfViewer.ContinueSearchFrom = DevExpress.Xpf.PdfViewer.PdfContinueSearchFrom.CurrentPage;
// Specify search options.
TextSearchParameter parameters = new TextSearchParameter
{
CurrentPage = 3,
IsCaseSensitive = false,
WholeWord = true,
Text = "text"
};
// Start your search from the third page.
pdfViewer.FindText(parameters);
// Process the search results.
// ...
// Scroll the document and continue your search from the specified page.
Dispatcher.BeginInvoke(new Action(() =>
{
// Change the current page.
pdfViewer.CurrentPageNumber = 100;
// Continue your search.
pdfViewer.FindText(parameters);
}), DispatcherPriority.ContextIdle);
};
AddHandler pdfViewer.DocumentLoaded, Sub(s, e)
' Specify that your search should always continue from the current page.
pdfViewer.ContinueSearchFrom = DevExpress.Xpf.PdfViewer.PdfContinueSearchFrom.CurrentPage
' Specify search options.
Dim parameters As TextSearchParameter = New TextSearchParameter With {
.CurrentPage = 3,
.IsCaseSensitive = False,
.WholeWord = True,
.Text = "text"}
' Start your search from the third page.
pdfViewer.FindText(parameters)
' Process the search results.
' ...
' Scroll the document and continue your search from the specified page.
Dispatcher.BeginInvoke(New Action(Sub()
' Change the current page.
pdfViewer.CurrentPageNumber = 100
' Continue your search.
pdfViewer.FindText(parameters)
End Sub), DispatcherPriority.ContextIdle)
End Sub
See Also