-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
31 lines (29 loc) · 1.46 KB
/
MainWindow.xaml
File metadata and controls
31 lines (29 loc) · 1.46 KB
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
<Window x:Class="WpfWebviewApp.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:local="clr-namespace:WpfWebviewApp" xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800"
Loaded="Window_Loaded"
Closing="Window_Closing">
<Grid>
<!-- Define rows for layout -->
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<!-- For buttons -->
<RowDefinition Height="*" />
<!-- For WebView2 -->
</Grid.RowDefinitions>
<!-- Buttons in the first row -->
<StackPanel Orientation="Horizontal" Grid.Row="0" Margin="5">
<Label Height="28" Name="label1" VerticalAlignment="Top" Content="Select Source"/>
<ComboBox Width="200" Height="23" Margin="10,3,0,0" Name="cbxSources" VerticalAlignment="Top"/>
<Button Content="ScanToView" Click="btnScanToView_Click" Margin="5" />
<Button Content="SaveAsPdf" Click="btnSaveAsPdf_Click" Margin="5" />
</StackPanel>
<!-- WebView2 in the second row -->
<wv2:WebView2 x:Name="webView" Grid.Row="1"/>
</Grid>
</Window>