-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainWindow.xaml
57 lines (52 loc) · 3.09 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<Window
x:Class="WinUI3_NotifyIcon.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUI3_NotifyIcon"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<!--<ColumnDefinition Width="100"></ColumnDefinition>-->
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="200"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="0">
<!--<Button x:Name="myButton" Click="myButton_Click" Margin="10, 10, 0, 0"
HorizontalAlignment="Left">
Minimize to Tray
</Button>-->
<Button x:Name="myButton" Click="myButton_Click" HorizontalAlignment="Center" VerticalAlignment="Top" Width="66" Height="54" Margin="10, 10, 10, 0"
FontFamily="Segoe UI Emoji" FontSize="46" Content="📥" Padding="0, -12, 0, 0">
<ToolTipService.ToolTip>
<ToolTip Content="Minimize to Tray" Placement="Bottom" Background="LightYellow" Foreground="Black"/>
</ToolTipService.ToolTip>
</Button>
<ToggleSwitch Grid.Column="1" x:Name="tsNotify" Margin="20, 20, 0, 0" Header="Balloon Notification" HorizontalAlignment="Center"
OffContent="No" OnContent="Yes" Toggled="tsNotify_Toggled" >
<ToolTipService.ToolTip>
<ToolTip Content="Show Balloon Notification or not" Placement="Bottom" Background="LightYellow" Foreground="Black"/>
</ToolTipService.ToolTip>
</ToggleSwitch>
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1">
<RadioButtons Grid.Column="0" x:Name="rbContextMenu" Margin="10, 10, 0, 0" SelectedIndex="0" Header="Menu style" SelectionChanged="rbContextMenu_SelectionChanged">
<RadioButton Content="Standard Context Menu" x:Name="rbStandard">
<ToolTipService.ToolTip>
<ToolTip Content="Use standard style 
for Context Menu in Tray icon" Placement="Bottom" Background="LightYellow" Foreground="Black"/>
</ToolTipService.ToolTip>
</RadioButton>
<RadioButton Content="Owner-Drawn Context Menu" x:Name="rbOD">
<ToolTipService.ToolTip>
<ToolTip Content="Use Owner-Drawn Menu items 
for Context Menu in Tray icon" Placement="Bottom" Background="LightYellow" Foreground="Black"/>
</ToolTipService.ToolTip>
</RadioButton>
</RadioButtons>
</StackPanel>
</Grid>
</Window>