Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the Run within the TextBlock without space in XAML Winrt?

<TextBlock>
    <Run  Text="{Binding Percentage}"/>
    <Run Text="%"/>
</TextBlock>

I know this seems like a trivial question but I was wondering in the above code if Percentage value was 95 then it displays 95 % and not 95%. That is there is a space between the Run which I don't want. How to remove this.

Thanks in advance.

like image 670
AbsoluteSith Avatar asked Oct 15 '25 14:10

AbsoluteSith


1 Answers

Try writing them in the same line. e.g.

<TextBlock>
    <Run  Text="{Binding Percentage}"/><Run Text="%"/>
</TextBlock>
like image 146
Muhammad Hassan Avatar answered Oct 17 '25 23:10

Muhammad Hassan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!