Reputation: 622
I am experiencing with different layouts for my application.
The application consists of many buttons, panel etc., which are all created and visible at design time in Visual Studio.
In one layout the BackColors of all controls are e.g. gray, in a different approach I will change the BackColors to e.g. dark gray to see if this looks better.
Until now I'm doing the color property change by:
Is it in some way possible to e.g. "bind" specific properties of controls to e.g. a constant defined in a separate class, so when changing this property the properties of all associated controls will change accordantly (at design-time)?
Any help is appreciated!
Upvotes: 0
Views: 93
Reputation: 6689
An option is to create an Application Setting (double-click 'Settings.settings' file) of type System.Drawing.Color named (for example) ControlBackColor:
Then in the designer, set the (ApplicationSettings) binding for the controls you wish:
Now by just changing the Settings.settings location - the control settings will be modified.
Upvotes: 2