문제

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"/>
도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top