-
Notifications
You must be signed in to change notification settings - Fork 0
/
CrystalCameraPage.xaml
67 lines (67 loc) · 3.99 KB
/
CrystalCameraPage.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<Page x:Name="CrystalPage"
x:Class="Crystal.CrystalCameraPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Crystal"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<Style x:Key="HighlightedWordBox" TargetType="Border">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
<Style x:Name="ExtractedWordTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="Red"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="TextAlignment" Value="Center" />
</Style>
<Style x:Name="HighlightedWordBoxHorizontalLineStyle" TargetType="Border" BasedOn="{StaticResource HighlightedWordBox}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Blue" Opacity="0.5" />
</Setter.Value>
</Setter>
</Style>
<Style x:Key="HighlightedWordBoxVerticalLine" TargetType="Border" BasedOn="{StaticResource HighlightedWordBox}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Red" Opacity="0.5" />
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button">
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="White"/>
</Style>
</Page.Resources>
<Grid x:Name="CrystalGrid">
<Grid.Background>
<AcrylicBrush TintColor="#CC9E9E9E" TintOpacity="0.6" Opacity="0.395" FallbackColor="#CC9E9E9E" BackgroundSource="HostBackdrop"/>
</Grid.Background>
<Grid x:Name="RootGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Center" Grid.Row="1" Margin="0,0,0,80">
<Grid.Background>
<AcrylicBrush/>
</Grid.Background>
<CaptureElement Name="PreviewControl" Stretch="Uniform"/>
<Grid x:Name="Image" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image x:Name="PreviewImage" HorizontalAlignment="Left" VerticalAlignment="Top" SizeChanged="PreviewImage_SizeChanged"/>
<Grid x:Name="TextOverlay" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</Grid>
</Grid>
<TextBlock x:Name="StatusBlock" Grid.Row="2" Margin="12, 10, 12, 10" Visibility="Collapsed"/>
<AppBarButton x:Name="BackToFileButton" Icon="Back" Margin="20,0,0,20" Grid.Row="1" VerticalAlignment="Bottom" Width="40" Height="40" CornerRadius="20,20,20,20" ToolTipService.ToolTip="Go back to OCR file"/>
<AppBarButton x:Name="TriggerCameraButton" Icon="Camera" Margin="0,0,110,20" Grid.Row="1" CornerRadius="20,20,20,20" Width="40" Height="40" VerticalAlignment="Bottom" HorizontalAlignment="Right" ToolTipService.ToolTip="Camera view"/>
<AppBarButton x:Name="ExtractTextButton" Icon="Character" Margin="0,0,65,20" Grid.Row="1" CornerRadius="20,20,20,20" Width="40" Height="40" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsEnabled="False" ToolTipService.ToolTip="Extract"/>
<Image x:Name="ProfilePhoto" HorizontalAlignment="Right" Height="40" Margin="0,0,20,20" VerticalAlignment="Bottom" Width="40" Source="/Assets/Crystal Logo.png" Grid.Row="1"/>
</Grid>
</Grid>
</Page>