Question

I am creating a data binding app and for line 3 I want to use 
 to create several lines.

e.g.

this.Items.Add(new ItemViewModel() { ID = "0", LineOne = "Title", LineTwo = "short desc", LineThree = "Line 1 
 Line 2"});

However, when I run the application the LineThree is displayed as:

Line 1 
 Line 2

instead of:

Line 1
Line 2

The text block uses the following xaml:

<TextBlock Grid.Row="1" Text="{Binding LineThree}" TextWrapping="Wrap" Style="{StaticResource PhoneTextNormalStyle}"  FontFamily="Portable User Interface"/>
Was it helpful?

Solution

XAML is not HTML... "&#13;" is an HTML entity code, and won't work in XAML. Use "\n" instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top