I want to display numbers i thousand separated format. Numbers are displayed in a Column of ListView control. I’ve the following xaml code, but it doesn’t even compile!
<GridViewColumn Header="Total" DisplayMemberBinding="{Binding PaidValue, StringFormat={0:0,0}}" />
From my c# point of view, {0:0,0} is a correct format to do this, right? What is wrong with this?
The error is totally unrelated : “Unknown build error, ‘Key Can not be null’ pointing to the same line of xaml code. If tried other variants of the same format with no use.
OKay, I found a way to do this. I need to say that, in fact I DO have SP1 installed, so as a lot of blog posts are implying {0:c} should work, while it does not and will end up producing the same compile-time error! Here’s how I did it:
Compiles and works with no problem. I wonder if other binding’s StringFormat values are still valid.