CHAPTER 29

Image

Printing

WPF includes a revamped printing model that organizes all your coding around a single ingredient: the PrintDialog class in the System.Windows.Controls namespace. Using the PrintDialog class, you can show a Print dialog box where the user can pick a printer and change its setting, and you can send elements, documents, and low-level visuals directly to the printer. In this chapter, you'll learn how to use the PrintDialog class to create properly scaled and paginated printouts.

Basic Printing

Although WPF includes dozens of print-related classes (most of which are found in the System.Printing namespace), there's a single starting ...

Get Pro WPF 4.5 in C#: Windows Presentation Foundation in .NET 4.5, Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.