Documents and Printing

The document support in WPF is about flowing all the different content types you've seen in the rest of this chapter, along with special text-specific content types, into a seamless whole, a small sample of which is shown in Figure 1-22.

■ FlowDoc Exam pie

1 CD | S

A FlowDocument is a text document that can be formatted to adjust the available space. This enables an application to adapt to a wide variety of form factors. For example, if the user has a tablet PC, they may be able to choose between portrait and landscape orientations. Applications that axe able to adapt to either layout will be of more use on such devices than those with an inflexible approach to layout.

Another benefit of flow documents it that they can be displayed either in the classic HTML-style scrolling view, or in a paginated multi-column view. This might not sound like a good thing: if you are used to reading columnar text on the internet, you may not have enjoyed the experience. Most multi-column layouts are designed for print, and the column heights have been tailored for the target paper size. This will usually be taller than a computer screen. Reading such text on screen is a horrible experience because you have to scroll down through one column, and then scroll back up to the start of the next onef severely disrupting the

@ <1

of 4 ► B HIH - —N-+

Figure 1-22. A flowing document

The text-specific content support is provided with the flow document and related elements that provide advanced typography; adaptive, flow-based layout; spellchecking; hyphenation; and more, as described in Chapter 14.

In addition, the base of the flow document supports printing, as do the rest of the WPF visual elements, via the XML Paper Specification (XPS), as covered in Chapter 15.

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment