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
444
XamNumericEditor, Min, Max and Doubles
posted

Hi

Is there a simple way to define Min and Max and use Doubles ?

For example any double between -2.000 and +2.000

Have {number:-2-2}, great if we dont need decimals.

Have {double:-1.3}, great but I would have to check the range myself.

cheers

Martin

 

 

Parents
No Data
Reply
  • 444
    Verified Answer
    posted

    I am talking to myself, I am going to convert my own mask {double:-2.00-2.00} and use ValueConstraint

     public class XamDoubleNumericEditor : XamNumericEditor

    {

    public double Min { get; set; }

    public double Max { get; set; }

    public new string Mask

    {

    get

    {

    return base.Mask;

    }

    set

    {

    base.Mask = "-n.nnn";

    ValueConstraint constraint = new ValueConstraint();

    constraint.MinInclusive = Min;

    constraint.MaxInclusive = Max;

    base.ValueConstraint = constraint;

    }

    }

    }

Children
No Data