public static void SetNextTheme() { if (ActiveTheme != null) { var themes = AvailableThemes.ToList(); var i = themes.IndexOf(ActiveTheme); var next = i + 1 == themes.Count ? 0 : i + 1; SetTheme(themes[next]); } else if (AvailableThemes.Count > 0) { SetTheme(AvailableThemes.First()); } }
private void OnAvailableThemesUpdated(object sender, NotifyCollectionChangedEventArgs e) { App.LocalSettings.Save("AvailableThemeNames", AvailableThemes.ToList().Select(t => t.NormalisedName)); }