Ver código fonte

视图-交互细节优化

OYXH\oyxh 1 ano atrás
pai
commit
9ea4420b46

+ 2 - 2
PDF Office/ViewModels/BottomToolContentViewModel.cs

@@ -360,10 +360,10 @@ namespace PDF_Office.ViewModels
                 }
                 else
                 {
-                    if (item is ViewModularContent bOTAContent1)
+                    if (item is ViewModularContent viewModular)
                     {
                         var contentRegion = region.Regions[ViewContentViewModel.PropertyRegionName];
-                        contentRegion.Activate(bOTAContent1);
+                        contentRegion.Activate(viewModular);
                     }
                 }
             }

+ 8 - 0
PDF Office/ViewModels/PropertyPanel/ViewModular/ViewModularContentViewModel.cs

@@ -578,6 +578,13 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
 
         public void OnNavigatedFrom(NavigationContext navigationContext)
         {
+            if (BottomToolContentViewModel != null)
+            {
+                IsSingleView = BottomToolContentViewModel.IsSingleView;
+                IsTwoPageView = BottomToolContentViewModel.IsDoubleView;
+                IsBookModeView = BottomToolContentViewModel.IsBookMode;
+                IsContinue = BottomToolContentViewModel.IsContinue;
+            }
         }
 
         public void OnNavigatedTo(NavigationContext navigationContext)
@@ -600,6 +607,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
             IsTwoPageView = BottomToolContentViewModel.IsDoubleView;
             IsBookModeView = BottomToolContentViewModel.IsBookMode;
             IsContinue = BottomToolContentViewModel.IsContinue;
+            PDFViewer.InfoChanged -= PDFViewer_InfoChanged;
             PDFViewer.InfoChanged += PDFViewer_InfoChanged;
         }
 

+ 0 - 5
PDF Office/Views/PropertyPanel/ViewModular/ReadViewContent.xaml

@@ -62,9 +62,4 @@
             MouseEnter="RectangleReadMode_MouseEnter"
             Visibility="{Binding RectangleReadModeVisibility}" />
     </Grid>
-    <!--<i:Interaction.Triggers>
-    <i:EventTrigger EventName="Loaded">
-    <prism:InvokeCommandAction Command="{Binding Load}" />
-    </i:EventTrigger>
-    </i:Interaction.Triggers>-->
 </UserControl>