Browse Source

splitview - 控件移动后的同步刷新

sunhaonan 11 months ago
parent
commit
da825cc400

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

@@ -73,6 +73,7 @@ namespace Compdfkit_Tools.PDFControl
             PDFToolManager.MouseLeftButtonDownHandler -= PDFToolManager_MouseLeftButtonDownHandler;
             PDFToolManager.MouseLeftButtonUpHandler -= PDFToolManager_MouseLeftButtonUpHandler;
             PDFToolManager.MouseMoveHandler -= PDFToolManager_MouseMoveHandler;
+            PDFToolManager.AnnotDefaultEditedHandler -= PDFToolManager_AnnotDefaultEditedHandler;
 
             PDFViewTool.SizeChanged += PDFViewTool_SizeChanged;
             PDFViewTool.GetCPDFViewer().MouseWheelZoomHandler += PDFViewControl_MouseWheelZoomHandler;
@@ -80,6 +81,7 @@ namespace Compdfkit_Tools.PDFControl
             PDFToolManager.MouseLeftButtonDownHandler += PDFToolManager_MouseLeftButtonDownHandler;
             PDFToolManager.MouseLeftButtonUpHandler += PDFToolManager_MouseLeftButtonUpHandler;
             PDFToolManager.MouseMoveHandler += PDFToolManager_MouseMoveHandler;
+            PDFToolManager.AnnotDefaultEditedHandler += PDFToolManager_AnnotDefaultEditedHandler;
 
             splitViewerTool.SizeChanged -= SplitViewerTool_SizeChanged;
             splitViewerTool.GetCPDFViewer().MouseWheelZoomHandler -= SplitPDFViewControl_MouseWheelZoomHandler;
@@ -94,9 +96,15 @@ namespace Compdfkit_Tools.PDFControl
             splitToolManager.MouseLeftButtonDownHandler += PDFToolManager_MouseLeftButtonDownHandler;
             splitToolManager.MouseLeftButtonUpHandler += PDFToolManager_MouseLeftButtonUpHandler;
             splitToolManager.MouseMoveHandler += PDFToolManager_MouseMoveHandler;
+            splitToolManager.AnnotDefaultEditedHandler += PDFToolManager_AnnotDefaultEditedHandler;
 
         }
 
+        private void PDFToolManager_AnnotDefaultEditedHandler(object sender, EventArgs e)
+        {
+            UpdateAnnotFrame();
+        }
+
         private void PDFViewControl_Loaded(object sender, RoutedEventArgs e)
         {
             RemoveSplitViewerTool();