user2040785
user2040785

Reputation: 23

Winform tab control with single ui

I am developing a Winforms application where I need to use tabs. All tabs have the same UI (it will only change the content of text fields). Is it possible to create one template for all tabs?

Upvotes: 2

Views: 396

Answers (2)

Geo242
Geo242

Reputation: 597

You could create a custom control that has all the controls on it that you need and then add the custom control to each tab page.

Upvotes: 1

IAbstract
IAbstract

Reputation: 19881

If the UI is the same across all tabs, then you simply need to inform a view that the model is changing. Remove data bindings to old model and add data bindings to new model.

Another way would be to create a single UserControl. Each tab can reference it's own instance of the control and each control has it's own model to which it binds.

Upvotes: 2

Related Questions