handycontrol NotifyIcon ContextMenu
<hc:NotifyIcon Text="xxxx程序" Visibility="Collapsed" Name="notifyIcon"
Icon="/Assets/Ico/title.ico" Click="NotifyIcon_Click" MouseRightButtonDown="notifyIcon_MouseRightButtonDown" >
<hc:NotifyIcon.ContextMenu>
<ContextMenu>
<MenuItem Command="hc:ControlCommands.PushMainWindow2Top" Header="显示" />
<MenuItem Command="hc:ControlCommands.ShutdownApp" Header="退出" />
</ContextMenu>
</hc:NotifyIcon.ContextMenu>
<hc:Interaction.Triggers>
<hc:EventTrigger EventName="Click">
<hc:EventToCommand Command="hc:ControlCommands.PushMainWindow2Top"/>
</hc:EventTrigger>
<hc:EventTrigger EventName="MouseDoubleClick">
<hc:EventToCommand Command="hc:ControlCommands.PushMainWindow2Top"/>
</hc:EventTrigger>
</hc:Interaction.Triggers>
</hc:NotifyIcon>
留待后查,同时方便他人
联系我:renhanlinbsl@163.com
联系我:renhanlinbsl@163.com