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

Intermittent 'name already exists in the tree' error

1 Answer 20 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 23 Nov 2011, 07:02 PM

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)

1 Answer, 1 is accepted

Sort by
0
Charles
Top achievements
Rank 1
answered on 28 Nov 2011, 01:28 PM
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!
Tags
General Discussions
Asked by
Charles
Top achievements
Rank 1
Answers by
Charles
Top achievements
Rank 1
Share this question
or