新增托盘图标
This commit is contained in:
@@ -120,6 +120,27 @@
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="24" />
|
||||
</Grid.RowDefinitions>
|
||||
<ms:TrayIcon
|
||||
x:Name="MyTray"
|
||||
ClickCommand="{Binding ShowWindowCommand}"
|
||||
DoubleClickCommand="{Binding ShowWindowCommand}"
|
||||
IconPath="Resources/Images/authentication.ico"
|
||||
Tip="我的WPF程序托盘">
|
||||
|
||||
<!-- 原生的 WPF 右键菜单 -->
|
||||
<ms:TrayIcon.ContextMenu>
|
||||
<ContextMenu>
|
||||
<!-- 支持普通的 Click 事件 -->
|
||||
<MenuItem
|
||||
Click="MenuShow_Click"
|
||||
FontWeight="Bold"
|
||||
Header="显示主界面" />
|
||||
<Separator />
|
||||
<MenuItem Click="MenuExit_Click" Header="完全退出" />
|
||||
</ContextMenu>
|
||||
</ms:TrayIcon.ContextMenu>
|
||||
|
||||
</ms:TrayIcon>
|
||||
<!-- 工具栏 -->
|
||||
<ToolBarTray Margin="4,4,4,0">
|
||||
<ToolBar Foreground="{DynamicResource PrimaryFocusedBrush}" Header="工具栏">
|
||||
|
||||
Reference in New Issue
Block a user