Closed luluxiaoyu closed 8 months ago
enhancement
切换主题的时候需要更新资源字典如 internal void UpdateSkin(SkinType skin) { Resources.MergedDictionaries.Clear(); Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri($"pack://application:,,,/HandyControl;component/Themes/Skin{skin.ToString()}.xaml") }); Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml") }); }
希望能提供类似的直接切换主题/主题色的方法 如: BrushConverter brushConverter = new BrushConverter(); ThemeManager.Current.AccentColor = (Brush)brushConverter.ConvertFromString("#0078D4");
No response
Feature request type
enhancement
Is your feature request related to a problem? Please describe
切换主题的时候需要更新资源字典如 internal void UpdateSkin(SkinType skin) { Resources.MergedDictionaries.Clear(); Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri($"pack://application:,,,/HandyControl;component/Themes/Skin{skin.ToString()}.xaml") }); Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml") }); }
Describe the solution you'd like
希望能提供类似的直接切换主题/主题色的方法 如: BrushConverter brushConverter = new BrushConverter(); ThemeManager.Current.AccentColor = (Brush)brushConverter.ConvertFromString("#0078D4");
Describe alternatives you've considered
No response
Additional context
No response