Pārlūkot izejas kodu

打印-绑定失败修复

liyijie 1 gadu atpakaļ
vecāks
revīzija
ba89f1d788

+ 8 - 8
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDocumentContentViewModel.cs

@@ -141,15 +141,15 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
             set => SetProperty(ref _paperHeight, value);
         }
 
-        private string _viewBoxWidth;
-        public string ViewBoxWidth
+        private double _viewBoxWidth;
+        public double ViewBoxWidth
         {
             get => _viewBoxWidth;
             set => SetProperty(ref _viewBoxWidth, value);
         }
 
-        private string _viewBoxHeight;
-        public string ViewBoxHeight
+        private double _viewBoxHeight;
+        public double ViewBoxHeight
         {
             get => _viewBoxHeight;
             set => SetProperty(ref _viewBoxHeight, value);
@@ -1708,13 +1708,13 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
         {
             if (height / width >= (248.0 / 180.0))
             {
-                ViewBoxHeight = "248.0";
-                ViewBoxWidth = (width / height * 248.0).ToString();
+                ViewBoxHeight = 248.0;
+                ViewBoxWidth = (width / height * 248.0);
             }
             else
             {
-                ViewBoxWidth = "180.0";
-                ViewBoxHeight = (height / width * 180.0).ToString();
+                ViewBoxWidth = 180.0;
+                ViewBoxHeight = (height / width * 180.0);
             }
         }