-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
49 lines (44 loc) · 1.68 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
<Window x:Class="RawInput.Touchpad.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
x:Name="WindowRoot"
WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Title="RawInput Touchpad for Windows"
WindowState ="Maximized"
Width="1000" Height="800"
ResizeMode="CanResize">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" VerticalAlignment="Center"
Margin="10,0">
<Run Text="Precision touchpad exists:"/>
<Run FontWeight="Bold"
Text="{Binding ElementName=WindowRoot, Path=TouchpadExists}"/>
</TextBlock>
<Button Grid.Row="0"
HorizontalAlignment="Right"
BorderThickness="0" Padding="8,4"
Content="Copy to clipboard"
Click="Copy_Click"/>
<DockPanel>
<Canvas x:Name="touchpadCanvas" Grid.Row="1" Background="Transparent" />
</DockPanel>
<TextBlock Grid.Row="1"
Margin="10,10,10,10"
TextWrapping="Wrap"
Text="{Binding ElementName=WindowRoot, Path=TouchpadContacts}" RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="1"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
</Window>