@@ -18,6 +18,7 @@ public sealed partial class AppearanceItem : Page
1818 private static bool inLoading = false ;
1919 public List < ToolBarVisual > ToolBarVisualList = [ ] ;
2020 public List < string > themeList = [ .. Enum . GetNames < ElementTheme > ( ) ] ;
21+ public List < string > effects = [ .. Enum . GetNames < Effect > ( ) ] ;
2122 public Dictionary < string , string > ToolBarName = new ( ) {
2223 { "HomeButton" , "“开始”按钮" } ,
2324 { "ForwardButton" , "“前进”按钮" } ,
@@ -34,10 +35,11 @@ public AppearanceItem()
3435 Visual = x . Value
3536 } ) . ToList ( ) ;
3637 toolBarVisualView . ItemsSource = ToolBarVisualList ;
38+ effectBox . ItemsSource = effects ;
3739
3840 inLoading = true ;
3941 appearanceView . SelectedIndex = themeList . IndexOf ( App . settings . Appearance ) ;
40- showMicaSwitch . IsOn = App . settings . ShowMicaIfEnabled ;
42+ effectBox . SelectedIndex = effects . IndexOf ( App . settings . BackgroundEffect . ToString ( ) ) ;
4143 inLoading = false ;
4244 }
4345
@@ -61,11 +63,11 @@ private void VisualChanged(object sender, RoutedEventArgs e)
6163 App . settings . ToolBar [ visual . Text ] = ( sender as ToggleSwitch ) . IsOn ;
6264 }
6365
64- private void MicaEffectChanged ( object sender , RoutedEventArgs e )
66+ private void EffectChanged ( object sender , SelectionChangedEventArgs e )
6567 {
6668 if ( ! inLoading )
6769 {
68- App . settings . ShowMicaIfEnabled = ( sender as ToggleSwitch ) . IsOn ;
70+ App . settings . BackgroundEffect = Enum . Parse < Effect > ( ( sender as ComboBox ) . SelectedItem . ToString ( ) ) ;
6971
7072 foreach ( Window window in App . mainWindows )
7173 {
0 commit comments