2
I have a usercontrol with the following configuration:
<UserControl x:Class="PainelPendencias.View.PendenciaConsulta"
x:Name="uCPendenciaConsulta"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
xml:lang="pt-BR"
d:DesignHeight="720" d:DesignWidth="1024">
In a Datagrid column I do the stringformat below:
<DataGridTextColumn Header="Valor" Binding="{Binding OperacaoValor, StringFormat=N}" IsReadOnly="True">
The value received to be formatted is: 100543.67M.
The problem is that some machines are being shown correctly: 100,543.67 and others are adding zeros: 10,054,367.00.
[Update] On the machine with incorrect format I went to the regional settings and removed the addition of 2 decimal places [palliative]. But in the machines that work this addition exists.
The first 2 are not compiled, I get the following message: "Type 'not found. Check that there is no missing Assembly reference and that all referenced assemblies have been created.". The last two are thus formatting "2.065.000" a value that was to be like this "2.065.000,00". The value I passed in the question is coming out like this: 100,544
– Denis
@Denis updated the answer, see if this format + force the culture to pt-BR is the way requested - with dot for thousands and comma decimally.
– Ismael
Perfect! Thanks to Ismael!!
– Denis