PrintDocument class
Defines a reusable object that sends output to a printer.
Inheritance
- Object
- DependencyObject
- PrintDocument
Syntax
Attributes
- MarshalingBehaviorAttribute(Agile)
- StaticAttribute(Windows.UI.Xaml.Printing.IPrintDocumentStatics, NTDDI_WIN8)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The PrintDocument class has these types of members:
Constructors
The PrintDocument class has these constructors.
| Constructor | Description |
|---|---|
| PrintDocument | Initializes a new instance of the PrintDocument class. |
Events
The PrintDocument class has these events.
| Event | Description |
|---|---|
| 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.
| Method | Description |
|---|---|
| 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.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject) | |
| Read-only | Gets a document source reference for this PrintDocument. | |
| Read-only | Identifies 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] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012
