Text="Some text:"
I want to add a space after the colon.
I've tried xml:space="preserve"
and  
but neither seems to work.
I know it can be done by adding margin, but I'm curious if there's another way.
Try this, it works for me.
<RelativePanel>
<TextBlock x:Name="test1" RelativePanel.Below="edLongitude">
ahoj  
</TextBlock>
<TextBlock x:Name="test2" RelativePanel.Below="edLongitude" RelativePanel.RightOf="test1" Text="nazdar" />
</RelativePanel>
Another alternative is using Run
:
<TextBlock Foreground="Black">
<Run Text="SomeText:"/>
<Run/>
</TextBlock>
The Run
element on a new line will add the space, but if you write the two Runs on the same line, the space will not be created:
<TextBlock Foreground="Black">
<Run Text="SomeText:"/><Run/>
</TextBlock>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With