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

Using the Run and LineBreak Objects

In XAML, whitespace is interpreted in the same way as in XML. Whitespace is collapsed, leading and trailing whitespace is removed, and multiple lines are placed on the same line. The LineBreak class represents an explicit new line in a TextBlock. To create a multiline TextBlock, use the LineBreak element within the content, as shown:

<TextBlock Style="{StaticResource LabelTextStyle}">    You are reading<LineBreak />    Windows Phone 8 Unleashed!</TextBlock>

Note

The XML-like format of XAML does not allow you to use the greater than > or less than < symbols within XAML. This is because the symbols are interpreted as being part of an element. Instead, use the character entity references: ...

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