This is a migrated thread and some comments may be shown as answers.

NumericUpDown has NullReferenceExpception when hosted in ElementHost

1 Answer 45 Views
This is a migrated thread and some comments may be shown as answers.
Homer Simpson
Top achievements
Rank 1
Homer Simpson asked on 14 Dec 2009, 07:43 PM
I'm having trouble with the RadNumericUpDown control.  I was able to boil it down to the following. 

1.  Create a Windows Application project
2.  Place a Element Host in the default form (Form1)
3.  Create a WPF UserControl.
4.  Place a RadNumericUpDown control in a UserControl:
<UserControl x:Class="UserControl1" 
    Height="300" Width="300"
            <RowDefinition Height="Auto"/> 
        <telerik:RadNumericUpDown Maximum="100" Minimum="0" IsInteger="True"/> 

5.  Place that UserControl in the Element Host
6.  Run the program.
7.  Attempt to click the up or down button in the RadNumericUpDown control. 
8.  Watch NullReferenceException occur. 

This works fine when run in a native WPF app, but fails when hosted in Winforms.

I've tried this with 2009Q2 and 2009Q3 builds. 

I'm currently on the trial for RadControls, and this is pretty much preventing me from completing my evaluation and ultimately purchasing the product. 

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 15 Dec 2009, 01:09 PM
Hello Homer Simpson,

I tested your report and manage to reproduce the problem. We were checking for WPF application in order to provide mouse scroll of the control. However in your case there is not WPF application just UserControl so that was causing the crash. We fixed it and it will be available in this Friday's Latest Internal Build.

Please, excuse us for the inconvenience. We have added points to your account for your report. Don't hesitate to contact us if you have other questions.

Best wishes,
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Asked by
Homer Simpson
Top achievements
Rank 1
Answers by
Telerik team
Share this question