NumericUpDown has NullReferenceExpception when hosted in ElementHost

2 posts, 0 answers
  1. Homer Simpson
    Homer Simpson avatar
    1 posts
    Member since:
    Oct 2009

    Posted 14 Dec 2009 Link to this post

    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. 
  2. Boyan
    Boyan avatar
    758 posts

    Posted 15 Dec 2009 Link to this post

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top