|
5 | 5 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
6 | 6 | xmlns:local="clr-namespace:Net.Codecrete.QrCodeGenerator.Analyzer" |
7 | 7 | mc:Ignorable="d" |
8 | | - Title="QR Code" Height="560" Width="600" |
| 8 | + Title="QR Code" Height="650" Width="700" |
9 | 9 | Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"> |
10 | 10 | <Grid Margin="20,16,20,16"> |
11 | 11 | <Grid.ColumnDefinitions> |
12 | 12 | <ColumnDefinition Width="1*"/> |
13 | | - <ColumnDefinition Width="Auto"/> |
| 13 | + <ColumnDefinition Width="Auto" MinWidth="150"/> |
14 | 14 | </Grid.ColumnDefinitions> |
15 | 15 | <Grid.RowDefinitions> |
16 | 16 | <RowDefinition Height="1*"/> |
17 | 17 | <RowDefinition Height="Auto"/> |
| 18 | + <RowDefinition Height="Auto"/> |
18 | 19 | <RowDefinition Height="140"/> |
19 | 20 | </Grid.RowDefinitions> |
20 | 21 | <Image Source="{Binding Path=QrCodeImage}" Grid.Row="0" Grid.Column="0" Margin="0,0,0,16" |
21 | 22 | RenderOptions.BitmapScalingMode="NearestNeighbor" RenderOptions.EdgeMode="Aliased"/> |
22 | 23 | <Grid Grid.Row="0" Grid.Column="1"> |
23 | 24 | <Grid.ColumnDefinitions> |
24 | 25 | <ColumnDefinition Width="Auto"/> |
25 | | - <ColumnDefinition Width="Auto"/> |
| 26 | + <ColumnDefinition Width="1*"/> |
26 | 27 | </Grid.ColumnDefinitions> |
27 | 28 | <Grid.RowDefinitions> |
28 | 29 | <RowDefinition Height="Auto"/> |
|
32 | 33 | <RowDefinition Height="Auto"/> |
33 | 34 | <RowDefinition Height="Auto"/> |
34 | 35 | <RowDefinition Height="Auto"/> |
| 36 | + <RowDefinition Height="Auto"/> |
| 37 | + <RowDefinition Height="Auto"/> |
| 38 | + <RowDefinition Height="Auto"/> |
| 39 | + <RowDefinition Height="Auto"/> |
| 40 | + <RowDefinition Height="Auto"/> |
| 41 | + <RowDefinition Height="Auto"/> |
| 42 | + <RowDefinition Height="Auto"/> |
35 | 43 | </Grid.RowDefinitions> |
36 | | - <Label Content="Horz. Streaks:" Grid.Row="0" Grid.Column="0" Background="Transparent" Cursor="Hand" Tag="HorizontalStreaks" |
37 | | - PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
38 | | - <Label Content="{Binding Path=PenaltyDetails.HorizontalStreaks}" Grid.Row="0" Grid.Column="1" Background="Transparent" Cursor="Hand" Tag="HorizontalStreaks" |
39 | | - PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
40 | | - <Label Content="Vert. Streaks:" Grid.Row="1" Grid.Column="0" Background="Transparent" Cursor="Hand" Tag="VerticalStreaks" |
41 | | - PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
42 | | - <Label Content="{Binding Path=PenaltyDetails.VerticalStreaks}" Grid.Row="1" Grid.Column="1" Background="Transparent" Cursor="Hand" Tag="VerticalStreaks" |
43 | | - PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
44 | | - <Label Content="Boxes:" Grid.Row="2" Grid.Column="0" Background="Transparent" Cursor="Hand" Tag="Blocks" |
45 | | - PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
46 | | - <Label Content="{Binding Path=PenaltyDetails.Blocks}" Grid.Row="2" Grid.Column="1" Background="Transparent" Cursor="Hand" Tag="Blocks" |
47 | | - PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
48 | | - <Label Content="Horz. Finder:" Grid.Row="3" Grid.Column="0" /> |
49 | | - <Label Content="{Binding Path=PenaltyDetails.HorizontalFinderPatterns}" Grid.Row="3" Grid.Column="1" /> |
50 | | - <Label Content="Vert. Finder:" Grid.Row="4" Grid.Column="0" /> |
51 | | - <Label Content="{Binding Path=PenaltyDetails.VerticalFinderPatterns}" Grid.Row="4" Grid.Column="1" /> |
52 | | - <Label Content="Balance:" Grid.Row="5" Grid.Column="0"/> |
53 | | - <Label Content="{Binding Path=PenaltyDetails.ColorBalance}" Grid.Row="5" Grid.Column="1" /> |
54 | | - <Label Content="Total:" Grid.Row="6" Grid.Column="0"/> |
55 | | - <Label Content="{Binding Path=PenaltyDetails.Total}" Grid.Row="6" Grid.Column="1" /> |
| 44 | + <TextBlock Text="General" FontWeight="Bold" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Padding="5,2"/> |
| 45 | + <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="Gray" BorderThickness="0,0,0,1" VerticalAlignment="Bottom"/> |
| 46 | + <Label Content="Version:" Grid.Row="1" Grid.Column="0"/> |
| 47 | + <Label Content="{Binding Path=QrCodeVersion}" Grid.Row="1" Grid.Column="1"/> |
| 48 | + <Label Content="Size:" Grid.Row="2" Grid.Column="0"/> |
| 49 | + <Label Content="{Binding Path=QrCodeSize}" Grid.Row="2" Grid.Column="1"/> |
| 50 | + <Label Content="ECC:" Grid.Row="3" Grid.Column="0"/> |
| 51 | + <Label Content="{Binding Path=SelectedEcc}" Grid.Row="3" Grid.Column="1"/> |
| 52 | + <Label Content="Data Mask:" Grid.Row="4" Grid.Column="0"/> |
| 53 | + <Label Content="{Binding Path=SelectedDataMaskPattern}" Grid.Row="4" Grid.Column="1"/> |
| 54 | + <TextBlock Text="Penalty" FontWeight="Bold" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Padding="5,10,5,2"/> |
| 55 | + <Border Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="Gray" BorderThickness="0,0,0,1" VerticalAlignment="Bottom"/> |
| 56 | + <Label Content="Horz. Streaks:" Grid.Row="7" Grid.Column="0" Background="Transparent" Cursor="Hand" Tag="HorizontalStreaks" |
| 57 | + PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
| 58 | + <Label Content="{Binding Path=PenaltyDetails.HorizontalStreaks}" Grid.Row="7" Grid.Column="1" Background="Transparent" Cursor="Hand" Tag="HorizontalStreaks" |
| 59 | + PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
| 60 | + <Label Content="Vert. Streaks:" Grid.Row="8" Grid.Column="0" Background="Transparent" Cursor="Hand" Tag="VerticalStreaks" |
| 61 | + PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
| 62 | + <Label Content="{Binding Path=PenaltyDetails.VerticalStreaks}" Grid.Row="8" Grid.Column="1" Background="Transparent" Cursor="Hand" Tag="VerticalStreaks" |
| 63 | + PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
| 64 | + <Label Content="Boxes:" Grid.Row="9" Grid.Column="0" Background="Transparent" Cursor="Hand" Tag="Blocks" |
| 65 | + PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
| 66 | + <Label Content="{Binding Path=PenaltyDetails.Blocks}" Grid.Row="9" Grid.Column="1" Background="Transparent" Cursor="Hand" Tag="Blocks" |
| 67 | + PreviewMouseLeftButtonDown="HighlightLabel_MouseDown" PreviewMouseLeftButtonUp="HighlightLabel_MouseUp"/> |
| 68 | + <Label Content="Horz. Finder:" Grid.Row="10" Grid.Column="0"/> |
| 69 | + <Label Content="{Binding Path=PenaltyDetails.HorizontalFinderPatterns}" Grid.Row="10" Grid.Column="1"/> |
| 70 | + <Label Content="Vert. Finder:" Grid.Row="11" Grid.Column="0"/> |
| 71 | + <Label Content="{Binding Path=PenaltyDetails.VerticalFinderPatterns}" Grid.Row="11" Grid.Column="1"/> |
| 72 | + <Label Content="Balance:" Grid.Row="12" Grid.Column="0"/> |
| 73 | + <Label Content="{Binding Path=PenaltyDetails.ColorBalance}" Grid.Row="12" Grid.Column="1"/> |
| 74 | + <Label Content="Total:" Grid.Row="13" Grid.Column="0"/> |
| 75 | + <Label Content="{Binding Path=PenaltyDetails.Total}" Grid.Row="13" Grid.Column="1"/> |
56 | 76 | </Grid> |
57 | | - <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"> |
58 | | - <TextBox x:Name="QrCodeTextBox" Text="{Binding Path=Text, UpdateSourceTrigger=PropertyChanged}" |
| 77 | + <TextBox x:Name="QrCodeTextBox" Text="{Binding Path=Text, UpdateSourceTrigger=PropertyChanged}" |
| 78 | + Grid.Row="1" Grid.ColumnSpan="2" |
59 | 79 | Padding="5,3" Margin="0,6"/> |
| 80 | + <StackPanel Grid.Row="2" Grid.Column="0"> |
60 | 81 | <WrapPanel> |
61 | 82 | <Label Content="Error Correction:" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="0,5,12,5"/> |
62 | 83 | <ComboBox x:Name="ErrorCorrectionCombo" HorizontalAlignment="Left" VerticalAlignment="Center" Width="100" Margin="0,6,24,6" |
|
71 | 92 | <Label Content="Data Mask:" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="0,5,12,5"/> |
72 | 93 | <ComboBox x:Name="DataMaskCombo" HorizontalAlignment="Left" VerticalAlignment="Center" Width="100" Margin="0,6,24,6" |
73 | 94 | ItemsSource="{Binding Path=DataMasks, Mode=OneTime}" DisplayMemberPath="Item1" SelectedValuePath="Item2" SelectedValue="{Binding Path=DataMaskPattern}"/> |
74 | | - <Label Content="Selected Data Mask:" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="0,5,12,5"/> |
75 | | - <Label Content="{Binding Path=SelectedDataMaskPattern, Mode=OneWay}" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="0,5,12,5"/> |
76 | 95 | </WrapPanel> |
77 | | - <Button x:Name="CopyButton" Content="Copy QR Code" Grid.Row="3" Margin="0,6,0,0" |
78 | | - VerticalAlignment="Center" HorizontalAlignment="Right" Padding="10,3" Click="CopyButton_Click"/> |
79 | 96 | </StackPanel> |
80 | | - <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,12,0,0"> |
| 97 | + <Button x:Name="CopyButton" Content="Copy QR Code" Margin="0,6,0,0" |
| 98 | + VerticalAlignment="Top" HorizontalAlignment="Right" Padding="10,3" Click="CopyButton_Click" |
| 99 | + Grid.Row="2" Grid.Column="1"/> |
| 100 | + <Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,12,0,0"> |
81 | 101 | <Grid.RowDefinitions> |
82 | 102 | <RowDefinition Height="Auto"/> |
83 | 103 | <RowDefinition Height="1*"/> |
|
0 commit comments