public void ApplyColorTheme(MyColorTheme mycolortheme) { this.ForeColor = mycolortheme.GetColor(this.ForeColor, mycolortheme.ControlTextColor); this.BackColor = mycolortheme.GetColor(this.BackColor, mycolortheme.ControlColor); Color wc = mycolortheme.WindowColor; Color gc = mycolortheme.ControlColorDark; gridViewModel.SetColors(this.ForeColor, this.BackColor, wc, gc); Refresh(); }
public void ApplyColorTheme(MyColorTheme mycolortheme) { this.ForeColor = mycolortheme.GetColor(this.ForeColor, mycolortheme.ControlTextColor); this.BackColor = mycolortheme.GetColor(this.BackColor, mycolortheme.ControlColor); Color wc = mycolortheme.WindowColor; Color gc = mycolortheme.ControlColorDark; gridViewModel.SetColors(this.ForeColor, this.BackColor, wc, gc); foreach (var lc in LinkedControls) { if (FindForm().Contains(lc.Control)) { continue; } ColorThemeHelper.ApplyToControl(lc, mycolortheme); } Refresh(); }