I have a lot of different UserControls
and would like to maintain consistent UI settings (mainly colors and fonts). My first try was this:
public class UISettings
{
//...
public void SetupUserControl(ref UserControl ctrl)
{
ctrl.BackColor = this.BackColor;
}
}
to be called in every control like this:
settings.SetupUserControl(ref this);
As this
is read-only it cannot be passed by ref
argument so this does not work. What are other options to keep consistent UI without manually changing properties for every item?