Selaa lähdekoodia

ComPDFKit(win) - 内容编辑选中文字松开鼠标左键时更新字体属性

TangJinZhou 9 kuukautta sitten
vanhempi
commit
2f0c7730de

+ 19 - 0
Demo/Examples/Compdfkit_Tools/Edit/ContentEditCOntrol/ContentEditControl.xaml.cs

@@ -1097,6 +1097,25 @@ namespace Compdfkit_Tools.PDFControl
             {
                 PdfViewControl.SetIsShowStampMouse(false);
             }
+            else
+            {
+                int PageIndex = -1;
+                CPDFEditArea editAreaArea = PdfViewControl.PDFToolManager.GetSelectedEditAreaObject(ref PageIndex);
+                if (editAreaArea == null)
+                {
+                    return;
+                }
+                else
+                {
+                    if (editAreaArea.Type == CPDFEditType.EditText)
+                    {
+                        PDFEditParam pDFEditParam = ParamConverter.CPDFDataConverterToPDFEitParam(PdfViewControl.PDFToolManager.GetDocument(), editAreaArea, PageIndex);
+                        pdfContentEditControl.SetPDFTextEditData((TextEditParam)pDFEditParam, true);
+                        PropertyContainer.Child = pdfContentEditControl;
+                    }
+                    panelState.RightPanel = PanelState.RightPanelState.PropertyPanel;
+                }
+            }
         }
 
         private void PDFToolManager_MouseLeftButtonDownHandler(object sender, MouseEventObject e)