Well, as a rule, I post a question after the battle for an hour and soon after that I find a solution.
Tablets are initialized lazily. Therefore, they are not fully initialized until they become visible for the first time.
So, I added this code to my constructor:
tabControlDataSource.TabPages[0].Show();
tabControlDataSource.TabPages[1].Show();
tabControlDataSource.TabPages[2].Show();
but this did not work :(
However, it occurred to me that the designer might not be the best place. So I created an event handler for Shownas follows:
private void MainForm_Shown( object sender, EventArgs e )
{
tabControlDataSource.TabPages[0].Show();
tabControlDataSource.TabPages[1].Show();
tabControlDataSource.TabPages[2].Show();
}
And now everything works!
source
share