How to work with .NET TabPage controls that end in the same Form class?

I would like to structure the form using TabControl, but I would like each control in each TabPage tab not to be a member of the form to which I add TabControl. While I have defined these options, please comment or suggest alternatives:

1) Write a UserControl for each tab

2) Leave only the control in the main form, but include the public control variable and cut all the previous codes into separate classes

3) Reject the form constructor and do everything at runtime

4) Withdraw from Tabpage (not sure if this works and what are the consequences of design-time)

Thanks everyone

Andrew

+3
source share
2

WinForms , , . , , - , .

№1 - - . -, .

, , , . : , "" , .

, , , .:)

EDIT:

, , . , , , , . , LOC .

+3

1 , UserControl, UserControl .

2 - , , , , ​​.

3 10 , .

4 UserControl, TabPage, .

, 1.

+2

Source: https://habr.com/ru/post/1697572/


All Articles