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
335
XamNumericEditor preserving leading zero after value loaded
posted

Team,

I have a XamNumericEditor which mask as {}{double:-2.0} (a textbox editor for entering 2 digit time value).  However I would like to preserve the leading zero in the XamNumericEditor after value loaded to the field given it is a single digit number.

e.g. I have 2 and after value loaded, would like to see 02

Please advise.  Thanks!

Chris

  • 7305
    posted

    Chris,

    I just realized I provided you with WPF answer instead of Silverlight.

    The xamNumericEditor in silverlight does not have a Format property, but you can use xamNumericInput, and the mask and format setting is: Mask="{}{double:-2.0}" Format="00.#".

    I hope this works for you.

     

    Sam

  • 7305
    posted

    Hello Chris,

    You can use the Format property for leading zeros such as:  Format="00.0". I believe the default is "0.00". As a side note, you can also suppress all "insignificant" numbers (zeros), by using pound signs (#) instead of zeros, like Format="#.#".

    Let me know how this worked for you, or if you have any questions.

     

    Sam