-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
36 lines (35 loc) · 1.8 KB
/
Copy pathMainWindow.xaml
File metadata and controls
36 lines (35 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="LocalDrop.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:LocalDrop"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:tb="using:H.NotifyIcon"
mc:Ignorable="d"
Title="LocalDrop">
<Grid>
<Grid.Resources>
<BitmapImage x:Key="TrayIcon" UriSource="Assets/LocalDrop.ico" />
<MenuFlyout x:Name="TrayMenu" >
<MenuFlyoutItem Text="打开" x:Name="OpenMenuItem" Command="{x:Bind ShowWindowCommand}"/>
<MenuFlyoutSeparator/>
<MenuFlyoutItem Text="退出" x:Name="ExitMenuItem" Command="{x:Bind CloseWindowCommand}"/>
</MenuFlyout>
</Grid.Resources>
<NavigationView PaneDisplayMode="Left" SelectionChanged="NavigationView_SelectionChanged" IsSettingsVisible="false" IsBackButtonVisible="Collapsed">
<NavigationView.MenuItems>
<NavigationViewItem Content="接收" Icon="Read" Tag="NavItemReceiver"/>
<NavigationViewItem Content="发送" Icon="Send" Tag="NavItemSend"/>
<NavigationViewItem Content="设置" Icon="Setting" Tag="NavItemSetting"/>
</NavigationView.MenuItems>
<Frame x:Name="ContentFrame"/>
</NavigationView>
<tb:TaskbarIcon x:Name="TrayIcon"
IconSource="{StaticResource TrayIcon}"
ToolTipText="我的应用"
ContextFlyout="{StaticResource TrayMenu}"
Visibility="Collapsed"
DoubleClickCommand="{x:Bind ShowWindowCommand}"/>
</Grid>
</Window>