<Grid> <ListBox x:Name="lstItems"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock>Value:</TextBlock> <TextBlock Text="{Binding Value}"></TextBlock> <igEditors:XamCurrencyEditor Value="{Binding Value, Mode=OneWay}" IsReadOnly="True"/> <TextBlock>Expected:</TextBlock> <TextBlock Text="{Binding ExpectedValue}"></TextBlock> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox></Grid>
List<TestItem> values = new List<TestItem>();
How can I tell the XamCurrencyEditor to (global) use MidPointRounding.AwayFromZero when displaying data?
Hello tkrasinger,
I have been looking through your question and I can suggest you set the Mask and Format properties of the editor as follows:
Format="C2" Mask="{}{currency:6.2:c}"
This will force the editor to round the shown value and to display only two digits after the decimal point.
If you have any additional questions on this matter please feel free to ask.
Thanks, the Format="C2" did it. The Mask is not needed.