-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
50 lines (43 loc) · 2.61 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
<Window x:Class="Ocr.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="LightSteelBlue"
Title="MainWindow"
Height="475.167" Width="824.111" WindowStartupLocation="CenterScreen">
<Grid Margin="5,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="20"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="1" Text="Select image to scan for text." FontSize="18" VerticalAlignment="Bottom" Margin="5,10,5,10" TextWrapping="Wrap" Foreground="White" />
<Grid Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="FilePathTextBox" Grid.Column="0" VerticalContentAlignment="Stretch" />
<Button x:Name="ChoseImageButton" Grid.Column="1" Width="32" Content="..." HorizontalAlignment="Right" Padding="10,5" Margin="5,0,5,0" Click="OnChoseImageButtonClick" />
<Button x:Name="ScanImageButton" Grid.Column="2" Content="Scan whole Image" HorizontalAlignment="Right" Padding="10,5" Margin="5,0,5,0" Click="OnScanImageButtonClick" />
<Button x:Name="ScanRegionsButton" Grid.Column="3" Content="Scan Regions" HorizontalAlignment="Right" Padding="10,5" Margin="5,0,5,0" Click="OnScanRegionsButtonClick" />
</Grid>
<Grid Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image x:Name="Image" Grid.Column="0" Margin="0,10,3,10" Stretch="Fill" />
<TextBox x:Name="ResultTextBox" Grid.Column="1" Margin="3,10,5,10" Foreground="Black" Background="White" Text="{Binding Result}" />
</Grid>
<TextBlock x:Name="ErrorTextBlock" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="0" Text="{Binding Error}" Foreground="Red" VerticalAlignment="Stretch" />
</Grid>
</Window>