I'm looking to add a comma and one 'space' after a binding. I have the comma after the binding but I cannot work out at all how to do a 'space'. This is what I have;
<TextBlock Text="{Binding Name, StringFormat={}{0:\,}\,}" />
Could someone please inform me on how to add a 'space' after the comma? I have tried literally adding a space in the XAML but this does not work.
XAML trims the string of whitespace unless you tell it where the string ends. Surround your string with single quotes.
<TextBlock Text="{Binding Name, StringFormat='{}{0}\, '}" />
Try this:
<TextBlock Text="{Binding Name, StringFormat='{}{0},\ '}" />
with this you can also add CR and LF (\ \).
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