public FolderViewModel() { ThemeChanger.SetDefaultTheme(); Theme = ThemeChanger.CurrentTheme; Ctrler = new Logic.FileManager.FileController("Win"); Itemlist = new ObservableCollection <Item>(Ctrler.GetFolderContents(CurrentFolderManager.CurrentFolderPath)); Theme.ThemeChanged += Theme_ThemeChanged; }
private void SwitchTheme_Click(object sender, RoutedEventArgs e) { MenuItem clickedTheme = (MenuItem)sender; Theme newTheme = (Theme)Enum.Parse(typeof(Theme), clickedTheme.Header.ToString()); CurrentDictionary.MergedDictionaries[0].Source = newTheme.ToUri(); MainImageBrush.ImageSource = newTheme.ToImage(); ThemeChanger.SetAsCurrentTheme(newTheme); (MainFrame.Content as IThemeChangeable).ChangeTheme(); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string theme = ThemeChanger.GetCurrentTheme().ToString(); if (value is Logic.FileManager.Item.File fi) { return($"/FileExplorer;component/GUI/Themes/{theme}/Images/File.png"); } else if (value is Logic.FileManager.Item.LinkFile) { return($"/FileExplorer;component/GUI/Themes/{theme}/Images/LinkFile.png"); } else if (value is Logic.FileManager.Item.Folder) { return($"/FileExplorer;component/GUI/Themes/{theme}/Images/Folder.png"); } else { return($"/FileExplorer;component/GUI/Themes/{theme}/Images/SomeFile.png"); } }
public void ChangeTheme() { CurrentDictionary.MergedDictionaries[0].Source = ThemeChanger.GetCurrentTheme().ToUri(); (IndexPageGrid.Children[0] as IndexControl).ChangeTheme(); }
public void ChangeTheme() { CurrentDictionary.MergedDictionaries[0].Source = ThemeChanger.GetCurrentTheme().ToUri(); }
void Awake() { Instance = this; _mainVolume = Camera.main.GetComponent <PostProcessVolume>(); _mainProfile = _mainVolume.profile; }