private void AppSettings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == "BackGroundColor") { var c = currentAppsettings.BackGroundColor; DCRenderView.SetClearColor(c.X, c.Y, c.Z, c.W); if (dcUI_Canvas != null) { dcUI_Canvas.PresentContent(); } } }
public void ApplySettings(AppSettings appSettings) { if (currentAppsettings != null) { currentAppsettings.PropertyChanged -= AppSettings_PropertyChanged; } currentAppsettings = appSettings; appSettings.PropertyChanged += AppSettings_PropertyChanged; var c = appSettings.BackGroundColor; DCRenderView.SetClearColor(c.X, c.Y, c.Z, c.W); if (dcUI_Canvas != null) { dcUI_Canvas.PresentContent(); } }