zhuyi преди 2 години
родител
ревизия
aceec60db5
променени са 2 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 1 1
      PDF Office/CustomControl/ScanViewControl/CustomPanel.cs
  2. 3 1
      PDF Office/Views/Scan/ScanViwer.xaml

+ 1 - 1
PDF Office/CustomControl/ScanViewControl/CustomPanel.cs

@@ -115,7 +115,7 @@ namespace PDF_Office.CustomControl.ScanViewControl
             if (BackgroundImage != null && BackgroundWidth > 0 && BackgroundHeight > 0)
             {
                 double scale = Math.Min(ActualWidth / BackgroundWidth, ActualHeight / BackgroundHeight);
-                scale = Math.Min(scale, 1);
+                //scale = Math.Min(scale, 1);
                 int drawWidth = (int)(scale * BackgroundWidth);
                 int drawHeight = (int)(scale * BackgroundHeight);
                 if (drawWidth < 10 || drawHeight < 10)

+ 3 - 1
PDF Office/Views/Scan/ScanViwer.xaml

@@ -5,7 +5,9 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:PDF_Office.Views.Scan" xmlns:scanviewcontrol="clr-namespace:PDF_Office.CustomControl.ScanViewControl" xmlns:scan="clr-namespace:PDF_Office.ViewModels.Scan" d:DataContext="{d:DesignInstance Type=scan:ScanViwerViewModel}"
              mc:Ignorable="d" >
-    <Grid >
+    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="800" Height="800">
         <scanviewcontrol:CustomPanel BGImage="{Binding BgImage}" OCRTextRectList="{Binding TextRectList}"/>
+        </Grid>
     </Grid>
 </UserControl>