Code below is a Design Time code.
It allows to add my tab pages to the tab control inherited from UltraTabControl.
Design Time behavior sufficient so far, but not perfect ( until I click on first-tab-page, click does not do same for second tab page ).
Anything else has to be done to set up tab page or tab control or tab for all this to work properly at Design and Run Time ?
myTab.TabPage = new MyTabPage();
MyTabControl.Controls.Add(myTab.TabPage);
MyTabControl.Tabs.Add(myTab);
public class MyTabPage : Infragistics.Win.UltraWinTabControl.UltraTabPageControl
and
public class MyTabControl: Infragistics.Win.UltraWinTabControl.UltraTabControl
Thank you
There is MyTabControl inherited from UltraTabControl
When MyTabControl is used = dropped on the form and tabs are added using properties window ( Design Time) ,
code is generated in designer.cs file.
Some of generated code uses UltraTabPageControl type, UltraTab type and other Ultra types.
What would be the proper way to "turn off" generation of Ultra... types in designer.cs
And have MyTabControl work properly at Design time and at Run time ?
You can try setting your derived UltraTabControl's SharedControlsPage in the constructor of your tab control. That way the tab control won't lazily create it shared control page and create an UltraTabPageControl. Also, what problem are you having with the normal UltraTabPageControl? Maybe you can work around it without having to create a derived control.
UltraTabSharedControlsPage
public class MyTabSharedControlsPage : Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage
{
}
Shared Controls page of this type is added to MyTabControl (inherits from UltraTabControl) :
this.SharedControlsPage = null;
this.Controls.Add(SharedControlsPage);
As result shared controls page is not visible at Design Time and it is not possible to drop controls onto it. Why ?