Hi,
i´m testing the xamNumericEditor. I´m using MVVM. I will bind the value-property of xamNumericEdior to a property with value int32=4711 in my viewmodel. When the app is running and i delete the value in the view, in my viewmodel, the last value int32=4 is stored. Is that a bug?
best regards from Germany
Christian
Hi Vlad,
where can i crate a default value?
I created a NullText="0". Than i changed InvalidValueBehavior="RetainValue". If I delete all my Values in the view, there is an "zero" in my editor. But in the ViewModel, the value is the last value i deleted, strored.
But i think we´re on the right way.
Best regards from Germany
Hi Christian,
Do you set InvalidValueBehavior="RevertValue" for the editor somewhere in your code? You can change this to RetainValue so the default value is passed to the ViewModel instead of the last entered value.
Let me know if this fix the problem.
Hi Alex,
that dosen´t work!
In my ViewModel the last value is strored.
Do you have an other idea?
Best regards from germany
You will need to create a ValueConstraint object and set its nullable property.
ValueConstraint constraint = new ValueConstraint();
constraint.Nullable = false;
_numericEditor.ValueConstraint = constraint;
how do I write that in CodeBehind?
When I write:
XamNumericEditor _numericEditor = new XamNumericEditor();
_numericEditor.ValueConstraint.Nullable = false;
In runtime I become an error.