PdfViewer.GoToDestination(String) Method
Navigates to the specified destination.
Namespace: DevExpress.XtraPdfViewer
Assembly: DevExpress.XtraPdfViewer.v24.2.dll
NuGet Package: DevExpress.Win.PdfViewer
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
destination |
String | The name of the destination to which the PDF Viewer should navigate. |
#Returns
Type | Description |
---|---|
Boolean | true if the operation is performed successfully; otherwise, false. |
#Remarks
Use the PdfViewer.DestinationNames proeprty to obtain a list of destination names.
#Example
The code sample below shows how to navigate to a destination when the document is loaded:
using DevExpress.XtraPdfViewer;
using System.Linq;
//...
pdfViewer.DocumentChanged += pdfViewer_DocumentChanged;
private void pdfViewer_DocumentChanged(object sender, PdfDocumentChangedEventArgs e) {
var destNames = pdfViewer.DestinationNames;
var dest = destNames.Where(x => x.Contains("Page 6")).First();
pdfViewer.GoToDestination(dest);
}