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.
Hello Atle,
Thank you for your feedback.
I am glad to know, you were able to you achieve the functionality you were looking for. If you require any further assistance on this matter, please do not hesitate to ask.
Hi,
Thanks for the example. I now see that I have bound to the "Text" property of the XamNumericEditor and not the "Value" property. It is a bit weird that binding to the "Text" property has worked at all (for non scientific notation). Binding to the "Value" property resolved my issue.
Thanks,
Atle
Thank you for the code snippet, you have provided.
I have been looking into your issue in regards to XamNumericEditor not showing the expected mask when updating from source and I was not able to reproduce it. To illustrate this I have created a custom application.Would you please modify it so the issue is reproduced and send it back to me? Having this information will help me further investigate this matter for you.
Looking forward for your reply.