using System; using System.Collections.Generic; using System.Windows; namespace EfemDualUI { /// /// Interaction logic for App.xaml /// public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { Dictionary StyleList = new Dictionary { {1, "Cyan"}, {2, "DeepBlue"}, {3, "GrayBlue"}, {4, "LightBlue"}, {5, "lightgreen"}, {6, "OceanBlue"}, {7, "SeaBlue"}, {8, "SkyBlue"}, {9, "Standard"} }; string ThemeType = StyleList[6]; //ThemeType = StyleList[1]; //ThemeType = StyleList[9]; string[] resources = new[] { $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/TextBox.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Button.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/ComboBox.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/MenuItem.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Listview.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/DataGrid.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Tab.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/ListBox.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/TreeView.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/GroupBox.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Scrollbar.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Expander.xaml", $@"pack://application:,,,/MECF.Framework.UI.Client;component/Themes/{ThemeType}/Skin.xaml", }; foreach (var resource in resources) { Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri(resource, UriKind.RelativeOrAbsolute) }); } base.OnStartup(e); } } }