Space in StringFormat
问题 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. 回答1: XAML trims the string of whitespace unless you tell it where the string ends. Surround your string with single quotes.