PrintDocument class

Applies to Windows only

Defines a reusable object that sends output to a printer.

Inheritance

Object
  DependencyObject
    PrintDocument

Syntax


public ref class PrintDocument : DependencyObject

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The PrintDocument class has these types of members:

Constructors

The PrintDocument class has these constructors.

ConstructorDescription
PrintDocument Initializes a new instance of the PrintDocument class.

 

Events

The PrintDocument class has these events.

EventDescription
AddPages Occurs when the PrintManager requests the final collection of pages to send to the printer.
GetPreviewPage Occurs when the PrintManager requests a particular print page to be shown in the preview window.
Paginate Occurs when the PrintManager requests the collection of print pages to be shown in the preview window.

 

Methods

The PrintDocument class has these methods. It also inherits methods from the Object class.

MethodDescription
AddPage Adds a XAML root visual element to the print list.
AddPagesComplete Indicates that the application will not add more pages to the print list, and that the print list is ready to be released.
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject)
InvalidatePreview References the low-level print preview dialog API and invalidates the current print preview.
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject)
SetPreviewPage Sets the specified print page as the current print preview page.
SetPreviewPageCount Sets the number of pages prepared for print preview and added to the print list.
SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject)

 

Properties

The PrintDocument class has these properties.

PropertyAccess typeDescription

Dispatcher

Read-onlyGets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject)

DocumentSource

Read-onlyGets a document source reference for this PrintDocument.

DocumentSourceProperty

Read-onlyIdentifies the DocumentSource dependency property.

 

Remarks

PrintDocument implements a print list concept whereby pages can be added to the print list, and then various methods can be called on the ongoing print list.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

Windows.UI.Xaml.Printing
Windows::UI::Xaml::Printing [C++]

Metadata

Windows.winmd

See also

DependencyObject
Quickstart: Adding simple print capability

 

 

Show:
© 2014 Microsoft