-
Notifications
You must be signed in to change notification settings - Fork 156
/
TextRecognitionPage.xaml
33 lines (33 loc) · 2.12 KB
/
TextRecognitionPage.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
<local:ImageScenarioPage x:Class="VisionAPI_WPF_Samples.TextRecognitionPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VisionAPI_WPF_Samples"
VerticalAlignment="Stretch"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Margin="5,5,0,0" FontWeight="Bold" Text="Recognize Text (English)"/>
<StackPanel Orientation="Vertical" Grid.Row="1" Margin="5,5,0,0" >
<TextBlock Margin="5, 5, 0, 0" Text="Choose a mode and image to recognize by clicking either [Load Image] or paste in an image URL and then clicking [Recognize Text]"/>
<ComboBox x:Name="_mode" Margin="5, 5, 0, 0" Width="110" HorizontalAlignment="Left">
<ComboBoxItem IsSelected="True">Printed</ComboBoxItem>
<ComboBoxItem>Handwritten</ComboBoxItem>
</ComboBox>
<Button Click="LoadImageButton_Click" Margin="5, 5, 0, 0" Width="80" HorizontalAlignment="Left">Load Image</Button>
<StackPanel Orientation="Horizontal" Margin="5, 5, 0, 0">
<TextBox x:Name="_urlTextBox" Width="361" Margin="5, 5, 0, 0">https://raw.githubusercontent.com/Microsoft/Cognitive-Vision-Windows/master/Sample-WPF/Assets/printed.jpg</TextBox>
<Button Click="SubmitUriButton_Click" Margin="5, 5, 0, 0">Recognize Text</Button>
</StackPanel>
</StackPanel>
<TextBlock x:Name="_status" Grid.Row="2" Margin="5" FontWeight="Bold"></TextBlock>
<Image Grid.Row="3" Margin="5, 5, 0, 0" x:Name="_imagePreview"></Image>
</Grid>
</local:ImageScenarioPage>