I am using XamNumericEditor and want to remove the thousands separator which is gifted to me when I choose double, currency or number. Below I am using double and want to keep the dot separator but loose the thousands comma separator.
Thanks,
Glenn
<Style TargetType="{x:Type igEditors:XamNumericEditor}" > <Setter Property="Mask" Value="{}{double:-10.1:c}"/> </Style>
Hi Glenn,
your idea is very useful. But i ve found a problem. The cell to which "Format" and mask properties are provided as shown below, is not displaying "0". Here is the part of code i ve done. Please suggest me a solution.
<Style TargetType="{x:Type igEditors:XamNumericEditor}">
<Setter Property="Mask"
Value="{}{char:9:0-9}" />
<Setter Property="ValueType"
Value="{x:Type sys:Double}" />
<Setter Property="Format"
Value="### ### ###"/>
</Style>
Alex,
A work-around to the ### option provided is to use char as:
{char:9:0-9.-}
I've yet to verify (data limitations) whether a negative number will display correctly. The decimal does appear correctly with this format.
Glenn,
Try this:
<Style TargetType="{x:Type igEditors:XamNumericEditor}"> <Setter Property="Mask" Value="#########.##"/><Setter Property="Format" Value="#########.##"/></Style>
Thanks for the info. Using that mask creates a rather ugly appearance of the numbers. (see image). I tried it with double, char, number with no improvement. You are right about one thing, it does remove the thousands separator. See the Synch Max column.
<Style TargetType="{x:Type igEditors:XamNumericEditor}"> <Setter Property="Mask" Value="{}{#########.##}"/> </Style>
Hello,
I believe that post should be rather in the xamEditors domain rather than here. In order to omit the throusands separator, you can use the format property, as well as mask like this:
Format="#########.##"
or
Format="### ### ###.##"
You can see some masks here.
Hope this helps.