O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Multiline TextBlock Text

As you have seen, TextBlock supports multiline text, either by setting TextWrapping to Wrap or by using LineBreak instances within the content.

Two properties, LineHeight and LineStackingStrategy, affect how multiline text is displayed. LineHeight determines the height of every line of text in the TextBlock. If LineHeight is set to a smaller value than the FontSize property, it may cause text to be vertically cropped. Typically, you leave LineHeight unset and rely on the default text rendering, which calculates the line height using FontSize plus an internal padding value.

The TextBlock class’s LineStackingStrategy property determines the algorithm that is used to calculate line height. The LineStackingStrategy is an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required