-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMainWindow.xaml
34 lines (32 loc) · 1.36 KB
/
MainWindow.xaml
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
<windowex:WindowEx
x:Class="BatteryTracker.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tb="using:H.NotifyIcon" xmlns:windowex="using:WinUIEx"
MinWidth="500" MinHeight="200"
PersistenceId="MainWindow"
mc:Ignorable="d">
<Window.SystemBackdrop>
<MicaBackdrop />
</Window.SystemBackdrop>
<tb:TaskbarIcon
x:Name="TrayIcon"
ContextMenuMode="PopupMenu"
LeftClickCommand="{StaticResource DisplayBatteryInfoCommand}"
NoLeftClickDelay="True" ToolTipText="Battery Tracker"
Visibility="Visible">
<tb:TaskbarIcon.IconSource>
<tb:GeneratedIconSource
BackgroundType="Rectangle" FontFamily="Arial" FontWeight="SemiBold"
Foreground="White" Text="99" />
</tb:TaskbarIcon.IconSource>
<tb:TaskbarIcon.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Command="{StaticResource OpenSettingsCommand}" />
<MenuFlyoutItem Command="{StaticResource ExitApplicationCommand}" />
</MenuFlyout>
</tb:TaskbarIcon.ContextFlyout>
</tb:TaskbarIcon>
</windowex:WindowEx>