Exception when setting HtmlSource

3 posts, 0 answers
  1. Alan Sauls
    Alan Sauls avatar
    12 posts
    Member since:
    Dec 2009

    Posted 28 Dec 2009 Link to this post

    I have downloaded the trial version of the Silverlight controls.  I am using Visual Studio 2010 and Silverlight 4.
    When I add the same code that is in the provided example when I set the HtmlSource I get the following exception:

    System.NullReferenceException was unhandled by user code
      Message=Object reference not set to an instance of an object.
           at Telerik.Windows.Controls.RadHtmlPlaceholder.get_RootHtmlElement()
           at Telerik.Windows.Controls.RadHtmlPlaceholder.SetContentOverflow()
           at Telerik.Windows.Controls.RadHtmlPlaceholder.OnSourceHtmlChanged()
           at Telerik.Windows.Controls.RadHtmlPlaceholder.OnSourceHtmlPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
           at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
           at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
           at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
           at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
           at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
           at Telerik.Windows.Controls.RadHtmlPlaceholder.set_HtmlSource(String value)
           at Bowne.XBRL.XBRLProcessor.MainPage.treeViewHeadings_SelectedItemChanged(Object sender, RoutedPropertyChangedEventArgs`1 e)
           at System.Windows.Controls.TreeView.OnSelectedItemChanged(RoutedPropertyChangedEventArgs`1 e)
           at System.Windows.Controls.TreeView.ChangeSelection(Object itemOrContainer, TreeViewItem container, Boolean selected)
           at System.Windows.Controls.TreeViewItem.Select(Boolean selected)
           at System.Windows.Controls.TreeViewItem.OnGotFocus(RoutedEventArgs e)
           at System.Windows.Controls.Control.OnGotFocus(Control ctrl, EventArgs e)
           at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

    Any ideas what is causing this?
  2. Valentin.Stoychev
    Valentin.Stoychev avatar
    2198 posts

    Posted 29 Dec 2009 Link to this post

    Hi Alan Sauls,

    I tested your scenario and it works on our end. Please find attached project.

    Let us know if there is anything specific related in your scenario.

    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. Alan Sauls
    Alan Sauls avatar
    12 posts
    Member since:
    Dec 2009

    Posted 29 Dec 2009 Link to this post

    Thanks for the prompt reply.  I solved it.  Although I had set windowless to true in my aspx file in my Web project(host for Silverlight control), during debug I was generating a temp html file(the default setting) which did not have windowless set to true.  After setting this to use a permanent file that I specify, it all worked correctly.
Back to Top