/// <summary> /// Sets the theme to the specified one /// </summary> /// <param name="id">Theme name</param> public void SetTheme(string id) { if (id == _activeId) { return; } if (!_themes.TryGetValue(id, out var theme)) { return; } _activeId = id; _activeTheme = theme; OnThemeChanged(); }
/// <summary> /// Registers the theme /// </summary> /// <param name="theme">Theme to register</param> public void RegisterTheme(ThemeInfo <TPropSet> theme) { _themes[theme.Id] = theme; }
public void Reset() { _themes.Clear(); _activeId = null; _activeTheme = default; }