Reputation: 381
I am learning xaml/C#. I am trying to write lines of text using a container. The closest example is this code in html
<div>
<div>Line1</div>
<div>Line2</div>
<div>...</div>
</div>
How can I do it in xaml.
Of course I can do it using simply TextBlock. The problem is that TextBlock does not allow me to add a kind of label like
<div>
<span>1</span>
text text
</div>
Upvotes: 0
Views: 599
Reputation: 89
<StackPanel Orientation="Vertical">
<TextBlock>Line1</TextBlock>
<TextBlock>Line2</TextBlock>
<TextBlock>Line3</TextBlock>
</StackPanel>
Upvotes: 1