|
| 1 | +<Page x:Class="DevTools.Pages.QrBarcodeDecodePage" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:resources="clr-namespace:DevTools.Resources" |
| 5 | + xmlns:local="clr-namespace:DevTools.Pages" |
| 6 | + Title="QrBarcodeDecodePage" |
| 7 | + KeyDown="Page_KeyDown"> |
| 8 | + <Page.Resources> |
| 9 | + <BooleanToVisibilityConverter x:Key="BoolToVis" /> |
| 10 | + </Page.Resources> |
| 11 | + <Grid Margin="20"> |
| 12 | + <StackPanel> |
| 13 | + <Button Click="Back_Click" HorizontalAlignment="Left" Margin="0,0,0,8" Width="40" Height="40" ToolTip="{x:Static resources:Strings.Back}"> |
| 14 | + <Button.Template> |
| 15 | + <ControlTemplate TargetType="Button"> |
| 16 | + <Border Background="#4A4A4A" CornerRadius="20" Width="40" Height="40" SnapsToDevicePixels="True"> |
| 17 | + <TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FFFFFF" /> |
| 18 | + </Border> |
| 19 | + </ControlTemplate> |
| 20 | + </Button.Template> |
| 21 | + </Button> |
| 22 | + <TextBlock Text="{x:Static resources:Strings.PageQrBarcodeDecode}" FontSize="18" Margin="0,10" /> |
| 23 | + |
| 24 | + <Border x:Name="ImageBorder" CornerRadius="8" BorderBrush="#4A4A4A" BorderThickness="2" Margin="0,10" Height="300" AllowDrop="True" Drop="ImageBorder_Drop" PreviewDragOver="ImageBorder_PreviewDragOver" PreviewDragLeave="ImageBorder_PreviewDragLeave" PreviewMouseLeftButtonDown="ImageBorder_PreviewMouseLeftButtonDown" Cursor="Hand"> |
| 25 | + <Grid> |
| 26 | + <ScrollViewer x:Name="ImageScrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Visibility="Collapsed"> |
| 27 | + <Image x:Name="PreviewImage" Stretch="None" /> |
| 28 | + </ScrollViewer> |
| 29 | + <StackPanel x:Name="PlaceholderPanel" HorizontalAlignment="Center" VerticalAlignment="Center"> |
| 30 | + <TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="" FontSize="48" FontWeight="Bold" HorizontalAlignment="Center" Foreground="#888888" /> |
| 31 | + <TextBlock Text="{x:Static resources:Strings.ClickOrDropImage}" FontSize="14" HorizontalAlignment="Center" Margin="0,10,0,0" Foreground="#888888" /> |
| 32 | + </StackPanel> |
| 33 | + </Grid> |
| 34 | + </Border> |
| 35 | + |
| 36 | + <TextBlock Text="{x:Static resources:Strings.DecodeResult}" FontSize="16" FontWeight="Bold" Margin="0,10,0,5" /> |
| 37 | + <TextBox x:Name="ResultText" Height="100" TextWrapping="Wrap" AcceptsReturn="True" IsReadOnly="True" Margin="0,0,0,10" /> |
| 38 | + |
| 39 | + <StackPanel Orientation="Horizontal"> |
| 40 | + <Button Click="CopyResult_Click" Width="100" Height="32" Margin="0,0,10,0" ToolTip="{x:Static resources:Strings.Copy}"> |
| 41 | + <StackPanel Orientation="Horizontal"> |
| 42 | + <TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="" FontSize="14" FontWeight="Bold" Foreground="#FFFFFF" Margin="0,0,6,0" /> |
| 43 | + <TextBlock Text="{x:Static resources:Strings.Copy}" FontSize="14" Foreground="#FFFFFF" /> |
| 44 | + </StackPanel> |
| 45 | + </Button> |
| 46 | + <Button Click="Clear_Click" Width="100" Height="32" ToolTip="{x:Static resources:Strings.Clear}"> |
| 47 | + <StackPanel Orientation="Horizontal"> |
| 48 | + <TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="" FontSize="14" FontWeight="Bold" Foreground="#FFFFFF" Margin="0,0,6,0" /> |
| 49 | + <TextBlock Text="{x:Static resources:Strings.Clear}" FontSize="14" Foreground="#FFFFFF" /> |
| 50 | + </StackPanel> |
| 51 | + </Button> |
| 52 | + </StackPanel> |
| 53 | + </StackPanel> |
| 54 | + </Grid> |
| 55 | +</Page> |
0 commit comments