Hi!
I use more XamNumericEditors to set some values. All these values are nullable, but in case they have a value, it should be >= 0. ValueType is set to Int32.
My problem is the following:
1) I change the value of Editor1 by clicking on the down arrow, it shows the max value of Int32 -> OK
2) I set the focus for Editor2 by clicking into the text area, as if I wanted to enter a value manually
3) I click on the up arrow by Editor1 (yes, Editor1), but the value of Editor2 will be incremented :O
How can I avoid this strange behaviour?
Both XamNumericEditors have a code like this:
<igEditors:XamNumericEditor ValueType="{x:Type sys:Int32}" Value="{Binding NumericValue, UpdateSourceTrigger=PropertyChanged}"> <igEditors:XamNumericEditor.ValueConstraint> <igEditors:ValueConstraint MinInclusive="0" Nullable="True" /> </igEditors:XamNumericEditor.ValueConstraint> </igEditors:XamNumericEditor>
I've also made a small gif, so that you can see this behaviour.
Thank you for your help!
Hello Hico,
I have created a sample project based on the code that you have provided to try and reproduce this issue that you are seeing, but following the steps that you have provided, I cannot seem to reproduce this odd behavior. It appears from your attached gif that perhaps the command tied to your spin button is targeting the "other" XamNumericEditor here. Perhaps the issue is a focus-related one? I cannot be sure at the moment.
One thing that I also had noticed about your behavior, is that when you press the down arrow and you get the maximum Int32. This is not the default behavior of the XamNumericEditor, and so I have to wonder if you are implementing your own spin button command in this case?
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 16.2.20162.2141 in Infragistics for WPF 2016 Volume 2.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer