Prev | Current Page 358 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"


It provides just four decorations, each of which allows you to add some sort of line to your
text. They include Baseline, OverLine, Strikethrough, and Underline. The Typography property
is more advanced??”it lets you access specialized typeface variants that only some fonts will
provide. Examples include different number alignments, ligatures (connections between adjacent
letters), and small caps.
For the most part, the TextDecorations and Typography features are found only in flow
document content??”which you use to create rich, readable documents. (Chapter 19 describes
documents in detail.) However, the frills also turn up on the TextBox class. Additionally, they??™re
supported by the TextBlock, which is a lighter-weight version of the Label that??™s perfect for
showing small amounts of wrappable text content. Although you??™re unlikely to use text decorations
with the TextBox or change its typography, you may want to use underlining in the
TextBlock, as shown here:
Underlined text
If you??™re planning to place a large amount of text content in a window and you want to
format individual portions (for example, underline important words), you should refer to
Chapter 19, where you??™ll learn about many more flow elements. Although flow elements are
designed for use with documents, you can nest them directly inside a TextBlock.


Pages:
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370