private void InitThemes() { // register custom theme string customThemePath = Path.Combine(Directory.GetCurrentDirectory(), CustomThemeName + ".c1themez"); if (File.Exists(customThemePath) && !C1ThemeController.IsThemeRegistered(CustomThemeName)) { C1ThemeController.RegisterTheme(customThemePath); } // load themes into ribbon combo box foreach (string theme in C1ThemeController.GetThemes()) { if (!(theme == CustomThemeName || theme.Contains("Office2016") || theme.Contains("Material"))) { continue; } _ribbonComboBoxThemes.Items.Add(theme); } // set default theme int customThemeIndex = _ribbonComboBoxThemes.Items.IndexOf(CustomThemeName); if (customThemeIndex > -1) { _ribbonComboBoxThemes.SelectedIndex = customThemeIndex; } }