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
1865
Why is this XamtextEditor format not working?
posted

 

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.

 

Parents
No Data
Reply
  • 30945
    Verified Answer
    Offline posted

    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

    MaskedEditorMaskAndFormat.zip
Children