protected override void InitializeLastChance() { base.InitializeLastChance(); IMesThemeManager manager = Mvx.IoCProvider.Resolve <IMesThemeManager>(); foreach (IMesTheme theme in manager.Themes) { switch (theme) { case MesBlueTheme blue: blue.Add(new Uri("pack://application:,,,/ColorPickerLib;component/Themes/LightBrushs.xaml")); break; case MesLightTheme light: light.Add(new Uri("pack://application:,,,/ColorPickerLib;component/Themes/LightBrushs.xaml")); break; case MesDarkTheme dark: dark.Add(new Uri("pack://application:,,,/ColorPickerLib;component/Themes/DarkBrushs.xaml")); break; default: break; } } }
public MesMainMenuSettingsViewModel() { _themeManager = Mvx.IoCProvider.Resolve <IMesThemeManager>(); SelectedTheme = _themeManager.CurrentTheme; AutoHideMainMenu = Properties.Settings.Default.AutoHideMainMenu; SelectedLanguage = Properties.Settings.Default.LanguageCode; }
protected override void InitializeLastChance(IMvxIoCProvider iocProvider) { base.InitializeLastChance(iocProvider); IMesThemeManager manager = Mvx.IoCProvider.Resolve <IMesThemeManager>(); foreach (IMesTheme theme in manager.Themes) { theme.Add(new Uri("pack://application:,,,/ColorPickerLib;component/Themes/Generic.xaml")); } }
public void RibbonTest() { Setup(); IMesThemeManager themeManager = Ioc.Resolve <IMesThemeManager>(); var themes = themeManager.Themes; Assert.AreEqual(3, themes.Count()); var blue = themes.First(x => x.Name.Contains("Blue")); Assert.AreEqual(2, blue.ApplicationResources.Count()); }
public void Load() { IMvxPluginManager manager = Mvx.IoCProvider.Resolve <IMvxPluginManager>(); manager.EnsurePluginLoaded <MinoriEditorShell.Platforms.Wpf.Plugin>(); // for repeatable ribbon items Uri[] mainribbon = new Uri[] { new Uri("pack://application:,,,/Fluent;Component/Themes/Generic.xaml"), new Uri("pack://application:,,,/Fluent;component/Themes/Accents/Cobalt.xaml"), }; IMesThemeManager thememanager = Mvx.IoCProvider.Resolve <IMesThemeManager>(); foreach (var theme in thememanager.Themes) { switch (theme) { case MesBlueTheme blue: blue.AddRange(mainribbon); blue.AddRange(new Uri[] { new Uri("pack://application:,,,/Fluent;component/Themes/Colors/BaseLight.xaml"), new Uri("pack://application:,,,/MinoriEditorShell.Ribbon;component/Platforms/Wpf/Themes/BlueTheme.xaml"), }); break; case MesLightTheme light: light.AddRange(mainribbon); light.AddRange(new Uri[] { new Uri("pack://application:,,,/Fluent;component/Themes/Colors/BaseLight.xaml"), new Uri("pack://application:,,,/MinoriEditorShell.Ribbon;component/Platforms/Wpf/Themes/LightTheme.xaml"), }); break; case MesDarkTheme dark: dark.AddRange(mainribbon); dark.AddRange(new Uri[] { new Uri("pack://application:,,,/Fluent;component/Themes/Colors/BaseDark.xaml"), new Uri("pack://application:,,,/MinoriEditorShell.Ribbon;component/Platforms/Wpf/Themes/DarkTheme.xaml"), }); break; } } }
public void Load() { // for repeatable ribbon items IMesThemeManager thememanager = Mvx.IoCProvider.Resolve <IMesThemeManager>(); foreach (var theme in thememanager.Themes) { switch (theme) { case MesBlueTheme blue: blue.Add(new Uri("pack://application:,,,/MinoriEditorShell.Ribbon;component/Platforms/Wpf/Themes/BlueTheme.xaml")); break; case MesLightTheme light: light.Add(new Uri("pack://application:,,,/MinoriEditorShell.Ribbon;component/Platforms/Wpf/Themes/LightTheme.xaml")); break; case MesDarkTheme dark: dark.Add(new Uri("pack://application:,,,/MinoriEditorShell.Ribbon;component/Platforms/Wpf/Themes/DarkTheme.xaml")); break; } } }
public MesGeneralSettingsViewModel() { _themeManager = Mvx.IoCProvider.Resolve <IMesThemeManager>(); SelectedTheme = _themeManager.CurrentTheme; SelectedLanguage = Properties.Settings.Default.LanguageCode; }