'Declaration
Public Event PdfFileNavigation As GdViewer.PdfFileNavigationHandler
public event GdViewer.PdfFileNavigationHandler PdfFileNavigation
public event PdfFileNavigation: GdViewer.PdfFileNavigationHandler;
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.PdfFileNavigationHandler* PdfFileNavigation
public: event GdViewer.PdfFileNavigationHandler^ PdfFileNavigation
Event Data
The event handler receives an argument of type GdViewer.PdfFileNavigationEventArgs containing data related to this event. The following GdViewer.PdfFileNavigationEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel | Allows to cancel the subsequent file navigation action when you turn this parameter to true in the raised event. |
FilePath | The path of the file to navigate to. |
Handled | (Inherited from System.Windows.RoutedEventArgs) |
OriginalSource | (Inherited from System.Windows.RoutedEventArgs) |
RoutedEvent | (Inherited from System.Windows.RoutedEventArgs) |
Source | (Inherited from System.Windows.RoutedEventArgs) |
Remarks
This event is only meaningful for PDF documents and it is solely raised only if the PdfEnableFileLinks property is set to true. At the same, this event only handles the file links defined by the GoToR action in PDF documents.
Example
How to utilize this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated 'and the PdfFileNavigation event has been properly added. 'Enabling PDF file links handling. PdfEnableFileLinks = True 'Define the event. Sub GdViewer1_PdfFileNavigation(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.PdfFileNavigationEventArgs) MessageBox.Show("The filename is: " + e.FilePath, "GdViewer.PdfFileNavigation") 'Turning this parameter to True disables automatic handling of the file by the toolkit. e.Cancel = True End Sub
//We assume that the GdViewer1 control has been properly integrated //and the PdfFileNavigation event has been properly added. //Enabling PDF file links handling. PdfEnableFileLinks = true; //Define the event. void GdViewer1_PdfFileNavigation(object sender, GdPicture14.WPF.GdViewer.PdfFileNavigationEventArgs e) { MessageBox.Show("The filename is: " + e.FilePath, "GdViewer.PdfFileNavigation"); //Turning this parameter to true disables automatic handling of the file by the toolkit. e.Cancel = true; }
See Also