-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMainWindow.xaml
46 lines (44 loc) · 3.4 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
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<!-- Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Window
x:Class="WinUI3_SwapChainPanel_Layered.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUI3_SwapChainPanel_Layered"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<SwapChainPanel x:Name="swapChainPanel1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
<Border x:Name="mainBorder" BorderThickness="3" CornerRadius="45" BorderBrush="Red" Background="Transparent" Margin="5, 5, 5, 5">
<StackPanel x:Name="sp1" Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<TextBlock x:Name="tb1" Text="Right-click to exit" Margin="5,5,5,5" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Yellow"/>
<Grid Margin="5, 70, 5, 5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image x:Name="img1" Source="Assets/Butterfly.png" Grid.Column="0" Width="250" Height="250" Stretch="Uniform" Margin="15, 5, 5, 5">
</Image>
<TextBlock x:Name="tb2" Grid.Column="0" Text="Not Click Through" Margin="5,5,5,5"
HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Visibility="Collapsed"/>
<Button x:Name="myButton" Click="myButton_Click" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10, 10, 10, 10" Background="Blue">
Set Bitmap
</Button>
<Image x:Name="img2" Source="Assets/Butterfly.png" Grid.Column="2" Width="250" Height="250" Stretch="Uniform" Margin="5, 5, 15, 5" IsHitTestVisible="false">
</Image>
<TextBlock x:Name="tb3" Grid.Column="2" Text="Click Through" Margin="5,5,5,5"
HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Visibility="Collapsed" IsHitTestVisible="false"/>
</Grid>
<ToggleSwitch x:Name="tsClickThrough" Header="Click Through" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="65, 5, 0, 5"
OffContent="No" OnContent="Yes" Toggled="tsClickThrough_Toggled" >
<ToolTipService.ToolTip>
<ToolTip Content="Set Click Through On/Off
when clicked on window background" Placement="Bottom" Background="LightYellow" Foreground="Black"/>
</ToolTipService.ToolTip>
</ToggleSwitch>
<!--<Rectangle Width="100" Height="100" Fill="Blue" Stroke="Orange" Margin="5, 40, 5, 5" IsHitTestVisible="False"
StrokeThickness="3" />-->
</StackPanel>
</Border>
</SwapChainPanel>
</Window>