'Declaration
Public Event AfterPrintPage As GdViewer.AfterPrintPageHandler
public event GdViewer.AfterPrintPageHandler AfterPrintPage
public event AfterPrintPage: GdViewer.AfterPrintPageHandler;
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.AfterPrintPageHandler* AfterPrintPage
public: event GdViewer.AfterPrintPageHandler^ AfterPrintPage
Event Data
The event handler receives an argument of type GdViewer.AfterPrintPageEventArgs containing data related to this event. The following GdViewer.AfterPrintPageEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel | Gets or sets a value indicating whether the print job should be canceled. Switching this value to true will subsequently terminate the printing job. |
Handled | (Inherited from System.Windows.RoutedEventArgs) |
OriginalSource | (Inherited from System.Windows.RoutedEventArgs) |
Page | The page number of the already printed page. |
PagesLeft | The number of pages left for printing. |
RoutedEvent | (Inherited from System.Windows.RoutedEventArgs) |
Source | (Inherited from System.Windows.RoutedEventArgs) |
Example
How to utilize this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated 'and the AfterPrintPage event has been properly added. 'Define the event. Sub GdViewer1_AfterPrintPage(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.AfterPrintPageEventArgs) MessageBox.Show("The page already printed: " + e.Page.ToString(), "GdViewer.AfterPrintPage") End Sub
//We assume that the GdViewer1 control has been properly integrated //and the AfterPrintPage event has been properly added. //Define the event. void GdViewer1_AfterPrintPage(object sender, GdPicture14.WPF.GdViewer.AfterPrintPageEventArgs e) { MessageBox.Show("The page already printed: " + e.Page.ToString(), "GdViewer.AfterPrintPage"); }
See Also