A Standardized Printing UI for Windows 8
Printer support has always been a key selling point for Windows. Its superior support for print drivers is often cited as a key reason why Windows won out over IBM’s OS/2. Yet the user interface aspects of this have long been neglected by Microsoft and each application usually ends up creating its own user interfaces.
Another problem is the print preview window, where each program is again responsible for providing its own support for print preview. In Windows 8 Metro solves this by combining the print preview window with the print dialog. Applications that support printing but not print preview will appear to be broken to the user.
With XAML-based applications there is quite a bit more work to do as developers are expected to use XAML to layout the preview and printed pages. Much like WPF and Silverlight printing, one must listen for events raised by an instance of PrintDocument. (This version of the class can be found in the Windows.UI.Xaml.Printing namespace.)
- AddPage: Indicates that a page is needed for printing
- Paginate: Triggered when the user changed a setting that may require repaginating the document.
- GetPreviewPage: Indicates that page is needed for previewing
Because it is based on the Windows.UI.Xaml namespace, printing logic cannot be shared between Metro and desktop-style applications.
Juergen Hoeller,Stéphane Nicoll Dec 18, 2014
Helen Walton Dec 17, 2014