Adds PrintDialog wraper to your project (with preview window)
Install-Package Notification.WPF -Version 6.0.0.0
Repo contains two projects:
- PrintPreview.WPF - Class library.
- PrintPreview.WPF.Test - C# Sample Project, examine IPrint class library usage.
using PrintPreview.WPF;
FlowDocument fd;
// Fill FlowDocument here
// prints FlowDocument to default printer with default settings
IPrintDialog.PrintDocument(fd);
// OR
// show preview Window with printer/page settings
IPrintDialog.PreviewDocument(fd);
using PrintPreview.WPF;
Grid uie;
// Fill Grid here
// prints UIElement to default printer with default settings
IPrintDialog.PrintUIElement(uie);
// OR
// show preview Window with printer/page settings
IPrintDialog.PreviewUIElement(uie);
- flowdocument - Document that will be printed
- uielement - UIElement that will be printed