Winforms 2011.2 at the moment but doesn't seem to matter what version.
Trying to open a windows form in Visual Studio 2012 pro (c#) and getting errors that the UltraPanel is read-only and when trying to build it generates:
"The Controls collection of the UltraPanel is read-only. Modify the UltraPanel.ClientArea.Controls collection instead." and it highlights this section of code in the designer file:
this.pnlLeft.Controls.Add(this.pnlLeft.ClientArea);
Changing to ClientArea like the error suggests, errors out with a circular error.
What is going on here?
Hi Admin,
The controls collection extended directly off of the UltraPanel object is read only; if you intend to programmatically add any controls to its collection, you will need to access the Add() method of the ClientArea of the panel instead, (ultraPanel1.ClientArea.Controls.Add(<controlToAdd>)).
It is not necessary to add the client area of the panel to its controls collection and this is certainly the cause of your circular reference.
I recommend commenting out this line altogether, (this.pnlLeft.Controls.Add(this.pnlLeft.ClientArea)) and assuming that the desired controls are being added to the controls collection as I mentioned above and that the UltraPanel has already been added to the controls collection of the form, then your project should build successfully.
If you have any further questions, please let me know.
Sincerely,Chris KDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support
I am not trying to manually add to the client area ... that's why this is a little weird. I have a windows form with 3 ultrapanels - left, center, right. There are various other controls placed in those panels like explorerbar, etc. In vs 2012 ide when I open the form and try to select the actual left panel, nothing gets selected. It's on the form but you can't select it. But, on the bottom panel area - place where menu's, status bars, binding sources, etc. get placed .... the panels are listed there. I can select the left panel there and voila, I can edit the properties.
Does that make sense?