'Declaration
Public Event PdfLaunchAction As GdViewer.PdfLaunchActionHandler
public event GdViewer.PdfLaunchActionHandler PdfLaunchAction
public event PdfLaunchAction: GdViewer.PdfLaunchActionHandler;
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.PdfLaunchActionHandler* PdfLaunchAction
public: event GdViewer.PdfLaunchActionHandler^ PdfLaunchAction
Event Data
The event handler receives an argument of type GdViewer.PdfLaunchActionEventArgs containing data related to this event. The following GdViewer.PdfLaunchActionEventArgs properties provide information specific to this event.
Property | Description |
---|---|
ActionType | A member of the PdfActionLaunchOperation enumeration. The type of the launch action to be executed. |
Cancel | Allows to cancel the subsequent application launching action when you turn this parameter to true in the raised event. |
FilePath | The path of the application to be launched or the file to be opened or printed according to the specified ActionType parameter. |
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. At the same, this event only handles the Launch action defined in the PDF documents.
Example
How to utilize this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated 'and the PdfLaunchAction event has been properly added. 'Define the event. Sub GdViewer1_PdfLaunchAction(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.PdfLaunchActionEventArgs) MessageBox.Show("The operation is: " + e.ActionType.ToString() + "\nThe filename is: " + e.FilePath, "GdViewer.PdfLaunchAction") '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 PdfLaunchAction event has been properly added. //Define the event. void GdViewer1_PdfLaunchAction(object sender, GdPicture14.WPF.GdViewer.PdfLaunchActionEventArgs e) { MessageBox.Show("The operation is: " + e.ActionType.ToString() + "\nThe filename is: " + e.FilePath, "GdViewer.PdfLaunchAction"); //Turning this parameter to true disables automatic handling of the file by the toolkit. e.Cancel = true; }
See Also