public async Task SetTheme(SpectroTheme theme) { CurrentTheme = theme; if (Window.Current.Content is FrameworkElement frameworkElement) { frameworkElement.RequestedTheme = theme.ToElementTheme(); } _applicationSettingsService.Local.Set(RequestedThemeKey, await Json.StringifyAsync(theme)); ThemeChanged?.Invoke(this, new ThemeChangedEventArgs(CurrentTheme)); }