Переглянути джерело

ComPDFKit(win) - 分屏相关问题

weixiangjie 7 місяців тому
батько
коміт
89aeb53102

+ 0 - 6
Demo/Examples/Compdfkit_Tools/PDFView/PDFViewControl/PDFViewControl.xaml.cs

@@ -66,7 +66,6 @@ namespace Compdfkit_Tools.PDFControl
             InitializeComponent();
             viewerTool = new CPDFViewerTool();
             toolManager = new CPDFToolManager(viewerTool);
-            Loaded += PDFViewControl_Loaded;
             PDFViewTool = viewerTool;
             PDFToolManager = toolManager;
             PDFToolManager.SetToolType(CPDFToolManager.ToolType.Viewer);
@@ -125,11 +124,6 @@ namespace Compdfkit_Tools.PDFControl
             UpdateAnnotFrame();
         }
 
-        private void PDFViewControl_Loaded(object sender, RoutedEventArgs e)
-        {
-            RemoveSplitViewerTool();
-        }
-
         private void PDFViewTool_DrawChanged(object sender, EventArgs e)
         {
             DrawChanged?.Invoke(sender, e);

+ 3 - 1
Demo/Examples/PDFViewer/MainPage.xaml.cs

@@ -20,6 +20,7 @@ using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Controls.Primitives;
 using System.Windows.Input;
+using Compdfkit_Tools.PDFControlUI;
 using static ComPDFKit.Tool.CPDFToolManager;
 
 namespace PDFViewer
@@ -594,12 +595,13 @@ baseWidget.GetAnnotData().Annot);
                 { 
                     PDFGrid.Child = contentEditControl;
                     viewControl.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.ContentEdit);
-                    viewControl.PDFViewTool.SetViewerModel(MouseModes.Viewer);
+                    viewControl.PDFViewTool.SetViewerModel(MouseModes.ContentEdit);
 
                     contentEditControl.OnCanSaveChanged -= ControlOnCanSaveChanged;
                     contentEditControl.OnCanSaveChanged += ControlOnCanSaveChanged;
                     contentEditControl.SetBOTAContainer(botaBarControl);
                     contentEditControl.SetDisplaySettingsControl(displaySettingsControl);
+                    contentEditControl.PdfViewControl.SetSplitViewMode(CPDFViewModeUI.SplitMode.None);
                 }
             }
             else if (item.Tag as string == "Document Editor")