private void LaunchDialog(object arg) { var oldTheme = secretsService.RetriveSecretTheme(); var message = oldTheme == SecretTheme.Light ? "You are about to enter the dak side" : "You going back to the light"; MessageBoxResult result = MessageBox.Show(message, "Confirmation", MessageBoxButton.OK, MessageBoxImage.Information); var theme = secretsService.SwitchTheme(oldTheme); Application.Current.Resources["AppBackground"] = ToSolidColorBrush(theme.BackgroundColor); Application.Current.Resources["AppForeground"] = ToSolidColorBrush(theme.ForegroundColor); Application.Current.Resources["AppButtonBackground"] = ToSolidColorBrush(theme.ButtonBackgroundColor); }