-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
55 lines (49 loc) · 2.3 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
<winex:WindowEx
x:Class="ImageOverlay.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ImageOverlay"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:winex="using:WinUIEx"
mc:Ignorable="d"
Height="400" Width="400"
MinWidth="200"
>
<Grid x:Name="imageGrid"
PointerPressed="imageGrid_PointerPressed"
PointerReleased="imageGrid_PointerReleased">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.Resources>
<CommandBarFlyout x:Name="ImageCommandsFlyout" ScrollViewer.HorizontalScrollMode="Disabled"
ShouldConstrainToRootBounds="False" Placement="Right">
<AppBarButton Icon="OpenLocal" ToolTipService.ToolTip="Open image" Click="OpenFileWindow_Click"/>
<AppBarToggleButton Icon="Pin" x:Name="pinToTopToggleButton" ToolTipService.ToolTip="Pin to Front" Click="pinToTopToggle"/>
<AppBarButton Icon="Cancel" Click="closeApp" ToolTipService.ToolTip="Close app"/>
</CommandBarFlyout>
</Grid.Resources>
<Grid x:Name="toolbarGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image x:Name="selectedImage" Stretch="Uniform"
Tapped="Image_Tapped" FlyoutBase.AttachedFlyout="{x:Bind ImageCommandsFlyout}"
PointerReleased="selectedImage_PointerReleased"
PointerPressed="selectedImage_PointerPressed"
ContextFlyout="{x:Bind ImageCommandsFlyout}"
Grid.ColumnSpan="2" Grid.RowSpan="2"/>
<Grid x:Name="cheekyTitlebarspace" Grid.Row="1"/>
</Grid>
</Grid>
</winex:WindowEx>