Intermittent 'name already exists in the tree' error

2 posts, 0 answers
  1. Charles
    Charles avatar
    15 posts
    Member since:
    Dec 2010

    Posted 23 Nov 2011 Link to this post

    I have an application with a single screen interface which contains several tab controls in which there may be nested tab controls and user controls (some of which are used a couple of times on the nested tabs

    I'm not sure it's a Telerik issue - but occasionally when running the application I get the following error:

    "The name already exists in the tree: tabSupplierDocuments" (sometimes it's thrown on different controls but usually this one)

    The application will work 95% of the time, but I am required to refresh the page to get the application to load, which isn't going down well with the end users

    It seems like depending on the order of things loading, that some namescope confusion is happening and controls are being added to the visual tree with the same names

    Does anyone have any ideas what could be causing this? I'm currently using the latest version of Telerik Silverlight controls (16th Nov 2011)

    I'll try to get a more complete call stack in the meantime and reply with the details (though it's throwing the error in InitialiseComponent for my main page control)

  2. Charles
    Charles avatar
    15 posts
    Member since:
    Dec 2010

    Posted 28 Nov 2011 Link to this post

    Figured this out due to someone elses post on another forum. Basically there is an issue when using unnamed usercontrols with nested named usercontrols inside them in SL4, so as I thought it wasn't really a Telerik problem

    It seems that sometimes the XAML parser gets mixed up when trying to identify a control and add it to the visual tree

    I just named all my usercontrols and the problem went away!
Back to Top