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
255
Crash when seting focus() to empty xamNumericInput with Nullable=false
posted

Hello,

I had a crash caused when clearing the field from a non-nullable xamNumericInput, selecting another element and then going back and focus this element.

I've created a small project with this crash using VS2013, you'll see a small commented code on the file MainWindow.xaml.cs which is how I've avoided the crash in my code, it's commented so you can see the crash.

How to Reproduce:

1.- Run the project
2.- Delete the number in the first field and then click the second one, a message will appear indicating that this value can't be null.
3.- Click on the blank field again. A crash will occur

As I indicated, this is triggered when calling the Focus() method if the value can't be null and the Text property is an empty string.

It's easy to avoid this crash but I think it shouldn't occur at all.

Kind Regards

WpfApplication1.zip
Parents
No Data
Reply
  • 34830
    Offline posted

    Hello Claudio,

    It appears in the sample project that you have sent that you are testing against version 14.2.20142.2081. Testing against this version, I am able to reproduce this exception that you are seeing, and it appears to be caused by a race condition between the validation of the value of the XamNumericInput control and the call to focus it when it is empty. It is also worth noting that the extra call to Focus() in this case appears to be superfluous, as the SelectAll method call will internally focus the control.

    I am glad that it is simple to avoid this crash in version 14.2.20142.2081, as this version has passed its development lifecycle as can be seen here: http://es.infragistics.com/support/product-lifecycle. As such, it will not be receiving any new development on this matter. After testing against the current versions 16.1 and 16.2, I am unable to reproduce this behavior that you are seeing, which means this issue was very likely found and fixed.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

Children
No Data