I have a view, let's call it MyTabView. In the designer, I have added a CAB TabWorkspace from the toolbox, let's call it MyTabWorkspace. I have then set up a group of tabs in the designer, to which I will be adding other views later in code.
My problem is, whenever I create more than one MyTabView, I get a runtime error, because the designer forces me to give the TabWorkspace a name (MyTabWorkspace) and CAB apparently uses this as the SmartPart ID for that control. So deep in the object builder,
I get a duplicate ID error.
My solution thus far has been to go into MyTabView.designer.cs and modify the designer-generated code, removing the line of code that sets the name for the TabWorkspace object. This is problematic, because every time I do something in the designer, it adds
that back in, and I either have to remember to remove it manually or face the run-time errors, which I may or may not realize immediately.
Is there a way to force the CAB to generate a GUID-based ID for that control every time it is created? Or a way to make the designer ignore the name property?