15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1084 ❘ ChaPTer 37 creAtinG dOcuments with wpf<br />

figure 37-9<br />

A Figure aligns horizontally <strong>and</strong> vertically <strong>and</strong> can be anchored to the page, content, a column, or a<br />

paragraph. The Figure in the following code is anchored to the page center but with a horizontal <strong>and</strong><br />

vertical offset. The WrapDirection is set so that both left <strong>and</strong> right columns wrap around the figure.<br />

Figure 37-10 shows the result of the wrap:<br />

<br />

<br />

<br />

Lyrics Samples<br />

<br />

<br />

<br />

figure 37-10<br />

Floater <strong>and</strong> Figure are both used to add content that is not in the main flow. Although these two features<br />

seem similar, the characteristics of these elements are quite different. The following table explains the<br />

differences between Floater <strong>and</strong> Figure.<br />

CharaCTerisTiCs floaTer figure<br />

Position<br />

Width<br />

Pagination<br />

A floater cannot be positioned. It is rendered<br />

where space is available.<br />

A floater can be placed only within one<br />

column. If the width is set larger than the<br />

column size, it is ignored.<br />

If a floater is larger than a column height,<br />

the floater breaks <strong>and</strong> paginates to the next<br />

column or page.<br />

A figure can be positioned with horizontal<br />

<strong>and</strong> vertical anchors. It can be docked<br />

relative to the page, content, column, or<br />

paragraph.<br />

A figure can be sized across multiple<br />

columns. The width of a figure can be<br />

set to 0.5 pages or 2 columns.<br />

If a figure is larger than a column height,<br />

only the part of the figure that fits in the<br />

column is rendered; the other content<br />

is lost.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!