Skip to content

Platonenkov/PrintPreview.WPF

 
 

Repository files navigation

PrintPreview.WPF

Adds PrintDialog wraper to your project (with preview window)

Install-Package Notification.WPF -Version 6.0.0.0

Demo

Repo contains two projects:

  • PrintPreview.WPF - Class library.
  • PrintPreview.WPF.Test - C# Sample Project, examine IPrint class library usage.

Library usage:

C#

FlowDocument
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);
UIElement
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);

Parameters:

  • flowdocument - Document that will be printed
  • uielement - UIElement that will be printed

About

Adds PrintDialog wraper to your project (with preview window)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%