PrintDocument.AddPages Event

Definition

Occurs when the PrintManager requests the final collection of pages to send to the printer.

public:
 virtual event AddPagesEventHandler ^ AddPages;
// Register
event_token AddPages(AddPagesEventHandler const& handler) const;

// Revoke with event_token
void AddPages(event_token const* cookie) const;

// Revoke with event_revoker
PrintDocument::AddPages_revoker AddPages(auto_revoke_t, AddPagesEventHandler const& handler) const;
public event AddPagesEventHandler AddPages;
function onAddPages(eventArgs) { /* Your code */ }
printDocument.addEventListener("addpages", onAddPages);
printDocument.removeEventListener("addpages", onAddPages);
- or -
printDocument.onaddpages = onAddPages;
Public Custom Event AddPages As AddPagesEventHandler 

Event Type

Remarks

Provide Windows with printable pages by calling AddPage for each page to be printed. Pass a UIElement that is the printable content to the AddPage method. Call AddPagesComplete to signal that all of the pages to be printed have been added and Windows can continue with the print job.

If the user specifies particular pages or a range of pages in the print options UI, only the specified pages should be added to the print list.

Applies to

See also