NotifiIcon的ContextMenu -> MenuItem -> Command 可以使用绑定

This commit is contained in:
yxhq committed 2020-03-13 21:27:42 +08:00
1 parent 1abbedcbe0
commit a53f495d7d
3 files changed
+54 -10

No files matched your search

@@ -41,6 +41,7 @@
<hc:NotifyIcon Token="{x:Static data:MessageToken.NotifyIconDemo}" Text="HandyControl" IsBlink="{Binding ContextMenuIsBlink}" Visibility="{Binding ContextMenuIsShow,Converter={StaticResource Boolean2VisibilityConverter}}">
<hc:NotifyIcon.ContextMenu>
<ContextMenu>
<MenuItem Command="{Binding SendNotificationCmd}" Header="{x:Static langs:Lang.SendNotification}"/>
<MenuItem Command="hc:ControlCommands.PushMainWindow2Top" Header="{x:Static langs:Lang.OpenPanel}"/>
<MenuItem Command="hc:ControlCommands.ShutdownApp" Header="{x:Static langs:Lang.Exit}"/>
</ContextMenu>