In some of my projets, I sometime do things like
TxtBox.Text = 10000.ToString("#,0.00") ' TxtBox.Text content = 10 000.00
However, if I have a DataGridTextBoxColumn with binding like this :
{Binding Amount,StringFormat='#,0.00'}
The value shown is 10,000.00 and not 10 000.00
I tried changing both the UI culture and Culture and the application startup but I can only change the way it appears when I use code and not in the binding. Is there any way to make this work ? Is there a 'BindingCulture' of some sort ???
Edit, here is an example of DataGrid I have
<DataGrid x:Name="GridModules" Grid.Column="0" ItemsSource="{Binding}" Style="{StaticResource BaseGrid}" IsTabStop="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Nom" Width="*" MinWidth="150"
Binding="{Binding Nom}"
IsReadOnly="True" />
<DataGridTextColumn Header="Prix" Width="120" MinWidth="100"
Binding="{Binding PrixAvantTaxe, StringFormat='#,0.00'}"
CellStyle="{StaticResource RightCellStyle}"
IsReadOnly="True" />
<DataGridCheckBoxColumn Header="Révisé" Width="100" MinWidth="100"
Binding="{Binding EstRevise}"
IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>
Edit : I think my question is misunderstood. I would like to get 10 000.00, which is what I get when I use code and NOT 10,000.00, which is what I get when I use binding in datagrids.