Skip to content

Commit 70a49de

Browse files
committed
ui: enhance tray context menu
1 parent 1c30a77 commit 70a49de

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

MultiMonitorWallpaperSwitcher/App.xaml

+12-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@
44
xmlns:local="clr-namespace:MultiMonitorWallpaperSwitcher"
55
xmlns:lang="clr-namespace:LanguageResources;assembly=LanguageResources"
66
xmlns:tb="http://www.hardcodet.net/taskbar"
7-
xmlns:taskbar="clr-namespace:MultiMonitorWallpaperSwitcher.Taskbar">
7+
xmlns:taskbar="clr-namespace:MultiMonitorWallpaperSwitcher.Taskbar"
8+
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes">
89
<Application.Resources>
910
<ResourceDictionary>
10-
<ContextMenu x:Key="TrayMenu" x:Shared="false">
11-
<MenuItem Header="{x:Static lang:Resource.ShowWindow}" Command="{Binding ShowWindowCommand}"/>
11+
<ResourceDictionary.MergedDictionaries>
12+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml"/>
13+
<materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="DeepPurple" SecondaryColor="Lime"/>
14+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.GroupBox.xaml"/>
15+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml"/>
16+
</ResourceDictionary.MergedDictionaries>
17+
<ContextMenu x:Key="TrayMenu" x:Shared="false" FontFamily="Microsoft YaHei">
18+
<MenuItem Header="{x:Static lang:Resource.ShowWindow}" Icon="{materialDesign:PackIcon Kind=Monitor}" Command="{Binding ShowWindowCommand}"/>
1219
<Separator/>
13-
<MenuItem Header="{x:Static lang:Resource.SwitchWallpaperSet}" Command="{Binding SwitchNextWallpaperSet}"/>
20+
<MenuItem Header="{x:Static lang:Resource.SwitchWallpaperSet}" Icon="{materialDesign:PackIcon Kind=SkipNext}" Command="{Binding SwitchNextWallpaperSet}"/>
1421
<MenuItem Header="{x:Static lang:Resource.PauseAutoSwitch}" IsCheckable="True" IsChecked="{Binding PauseState}"/>
1522
<Separator/>
16-
<MenuItem Header="{x:Static lang:Resource.ExitProgram}" Command="{Binding ExitApplicationCommand}"/>
23+
<MenuItem Header="{x:Static lang:Resource.ExitProgram}" Icon="{materialDesign:PackIcon Kind=ExitToApp}" Command="{Binding ExitApplicationCommand}"/>
1724
</ContextMenu>
1825
<tb:TaskbarIcon x:Key="Taskbar" ToolTipText="Multi-Monitor Wallpaper Switcher" IconSource="{Binding IconFile}" LeftClickCommand="{Binding ClickCustomCommand}" DoubleClickCommand="{Binding DoubleCustomCommand}" ContextMenu="{StaticResource TrayMenu}">
1926
<tb:TaskbarIcon.DataContext>

0 commit comments

Comments
 (0)