-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
58 lines (54 loc) · 2.59 KB
/
MainWindow.xaml
File metadata and controls
58 lines (54 loc) · 2.59 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
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
58
<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"
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 image display -->
</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="Scan" Click="btnScanToView_Click" Margin="5" />
<Button Content="SaveAsPdf" Click="btnSaveAsPdf_Click" Margin="5" />
</StackPanel>
<!-- Image display area in the second row -->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<!-- Thumbnail list -->
<ColumnDefinition Width="*" />
<!-- Main image display -->
</Grid.ColumnDefinitions>
<!-- Thumbnail list -->
<ListBox x:Name="thumbnailList" Grid.Column="0"
SelectionChanged="ThumbnailList_SelectionChanged"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Gray" BorderThickness="1" Margin="2">
<Image Source="{Binding}" Width="120" Height="120" Stretch="Uniform"/>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!-- Main image display -->
<Border Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" Margin="5">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Image x:Name="mainImage" Stretch="Uniform"/>
</ScrollViewer>
</Border>
</Grid>
</Grid>
</Window>