May 2010
Intermediate to advanced
1272 pages
61h 18m
English
TextBlockThe TextBlock control enables showing text messages. Its purpose is similar to the Label’s purpose, but it differs in that TextBlock offers deeper control over text customization. The following example demonstrates how you can present customized text using the TextBlock:

Font properties are of particular interest. FontFamily indicates the font name, FontStyle indicates if the font is normal or oblique, whereas FontWeight sets the font depth. IntelliSense enhancements in WPF 4 enable easy selections for available members on each of the previously mentioned properties. Figure 32.21 shows the result of the preceding code.
Figure 32.21 Drawing ...
Read now
Unlock full access