GdPicture.NET.14
GdPicture14.WPF Namespace / GdViewer Class / AfterPrintPage Event
Example





In This Topic
AfterPrintPage Event (GdViewer)
In This Topic
This event is raised right after a page has been successfully printed through the GdViewer control using one of the Print or PrintDialog methods.

The event makes use of bubble routing strategy. Please check the corresponded GdViewer.AfterPrintPageEventArgs for given parameters.

Syntax
'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.

PropertyDescription
Gets or sets a value indicating whether the print job should be canceled. Switching this value to true will subsequently terminate the printing job.  
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
The page number of the already printed page.  
The number of pages left for printing.  
(Inherited from System.Windows.RoutedEventArgs)
(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