Tab pages in different files?

  • Thread starter Thread starter Adam Clauss
  • Start date Start date
A

Adam Clauss

OK, I'm coming from a C++ (MFC) background, so bear with me :)

I've recently started a C# Windows Forms app. In the main form, I have a
tab control. I have added several different tabs to it (all presently
empty). Now, in C++ each of these tab's operated somewhat independently -
they were usually their own class, and contained in separate files. That
made managing them easy.

From what I've seen so far in C# however, it is creating the tabpages all
inside the mainform.cs file. I'm looking at possibly having ~ 10 tabs, so
by the time I add functionality to the tabs, this could get very very messy.

Is there a good way around this?
Thanks!
 
Adam,

What I would do is create separate user controls for each tab page.
This way, the code logic is in separate files. Then, I would add an
instance of each control to each tab page.

Hope this helps.
 
Back
Top