-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCrystalFilePage.xaml
58 lines (57 loc) · 3.82 KB
/
CrystalFilePage.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
<Page x:Name="CrystalPage"
x:Class="Crystal.CrystalFilePage"
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"
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="HighlightedWordBoxHorizontalLineStyle" TargetType="Border" BasedOn="{StaticResource HighlightedWordBox}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Blue" Opacity="0.5" />
</Setter.Value>
</Setter>
</Style>
<Style x:Name="HighlightedWordBoxVerticalLineStyle" TargetType="Border" BasedOn="{StaticResource HighlightedWordBox}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Red" Opacity="0.5" />
</Setter.Value>
</Setter>
</Style>
</Page.Resources>
<Grid>
<Grid.Background>
<AcrylicBrush TintColor="#CC9E9E9E" TintOpacity="0.6" Opacity="0.395" FallbackColor="#CC9E9E9E" BackgroundSource="HostBackdrop"/>
</Grid.Background>
<Grid x:Name="RootGrid" Margin="20,20,20,65">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ScrollViewer Grid.Row="1" VerticalScrollMode="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal" Margin="0, 0, 0, 5"/>
<Grid x:Name="Image" Margin="0,0,0,5">
<Image x:Name="PreviewImage" HorizontalAlignment="Left" VerticalAlignment="Top" SizeChanged="PreviewImage_SizeChanged" MaxWidth="600"/>
<Grid x:Name="TextOverlay" HorizontalAlignment="Left" VerticalAlignment="Top" />
</Grid>
<TextBlock Name="ExtractedTextBox" IsTextSelectionEnabled="True" TextWrapping="WrapWholeWords" />
</StackPanel>
</ScrollViewer>
</Grid>
<AppBarButton x:Name="GoToCameraPage" Icon="Forward" Margin="0,0,20,20" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="40" Height="40" CornerRadius="20,20,20,20" ToolTipService.ToolTip="Go to OCR camera"/>
<AppBarButton x:Name="ExtractTextButton" Icon="Character" Margin="155,0,0,20" VerticalAlignment="Bottom" Width="40" Height="40" CornerRadius="20,20,20,20" ToolTipService.ToolTip="Extract" IsEnabled="False"/>
<AppBarButton x:Name="UploadButton" Icon="Upload" Margin="110,0,0,20" VerticalAlignment="Bottom" Width="40" Height="40" CornerRadius="20,20,20,20" ToolTipService.ToolTip="Load a new document"/>
<AppBarButton x:Name="LoadDefaultImageButton" Icon="Preview" Margin="65,0,0,20" VerticalAlignment="Bottom" Width="40" Height="40" CornerRadius="20,20,20,20" ToolTipService.ToolTip="Load the sample document"/>
<AppBarButton x:Name="SaveAsDocumentButton" Icon="Save" Margin="200,0,0,20" VerticalAlignment="Bottom" Width="40" Height="40" CornerRadius="20,20,20,20" ToolTipService.ToolTip="Save as a text file" IsEnabled="False"/>
<Image x:Name="ProfilePhoto" HorizontalAlignment="Left" Height="40" Margin="20,0,0,20" VerticalAlignment="Bottom" Width="40" Source="/Assets/Crystal Logo.png"/>
</Grid>
</Page>