Mahsa
Mahsa

Reputation: 17

How can i apply a theme to all my forms in C#?

I want to Apply a theme to all my forms in c#. how can i do it?

i have too many forms. and they should all have the same style( orange background and a logo on top right) It is very time consuming. I would do it only once and it apply to all my forms.

Upvotes: 0

Views: 137

Answers (1)

Mairaj Ahmad
Mairaj Ahmad

Reputation: 14604

For ASP.NET WEBForms

You can use MasterPage and than add Content Pages inside it.

Add a Master Page in your project do all the designing in this back color logo and menus. Than add Content Pages which will have this MasterPage. So all your forms will have the same theme.

  • Right Click on your website from Solution Explorer.
  • Click Add New Item.
  • Select Master Page from the popup which appears.

For details see https://msdn.microsoft.com/en-us/library/wtxbf3hh(v=vs.140).aspx

For Windows Forms

You can use MDI Parent.

See this on how to use MDI Parent.

Upvotes: 2

Related Questions