Style esBeta = new Style();
esBeta.TargetType = typeof(XamTextEditor);
esBeta.Setters.Add(new Setter(XamTextEditor.MaskProperty, "-nnnn.nnnnn"));
esBeta.Setters.Add(new Setter(XamTextEditor.FormatProperty, "#.##"));
f.Settings.EditorStyle = esBeta;
// Where "f" is declared earlier as (Field f in e.FieldLayout.Fields)
The number is showing as 1.3232132321 as opposed to 1.32
Note: I do need to do this in code as opposed to xaml.
Hello,
Thank you for your post. I have been looking into it and I can suggest using a XamMaskedEditor instead, since the XamTextEditor does not expose a Mask property. You can also use the XamNumericEditor, which derives from the XamMaskedEditor and you can use its Mask and Format properties. I have created a sample application for oyu that demonstrates how you can use the XamMaskedEditro.
If you need any further assistance on the matter please do not hesitate to ask.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
I am just checking if you require any further assistance on the matter.