Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
545
XamNumericEditor scientific mask 'g' chops decimals when updated from source
posted

Hi!

I have a XamNumericEditor which I want to show scientific format in display mode so I created the following style:

<Style x:Key="ScientificNumericEditorStyle"
TargetType="{x:Type igWPF:XamNumericEditor}"
BasedOn="{StaticResource {x:Type igWPF:XamNumericEditor}}">
<Setter Property="TrimFractionalZeros" Value="True"/>
<Setter Property="Mask" Value="{}{double:-6.8}" />
<Setter Property="Format" Value="g6" />
</Style>

When I enter e.g. 0.00001234 into the editor, it shows 1.234e-5 as expected, however, when setting the value from the view model, i.e. updating the editor from source, it displays 1.234. The editor is bound to a nullable float if that matters. I'm using an old v.12.1 of Infragistics.