Sfoglia il codice sorgente

ComPDFKit(win) - 添加自定义命令:不带样式粘贴

weixiangjie 8 mesi fa
parent
commit
ee53a2a413

+ 3 - 40
Demo/Examples/Compdfkit_Tools/Edit/ContentEditCOntrol/ContentEditControl.xaml.cs

@@ -587,51 +587,13 @@ namespace Compdfkit_Tools.PDFControl
                     break;
                 default:
                     ContextMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Paste"), Command = ApplicationCommands.Paste, CommandTarget = (UIElement)sender });
+                    ContextMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_MatchPaste"), Command = CustomCommands.PasteWithoutStyle, CommandTarget = (UIElement)sender });
                     break;
             }
             PdfViewControl.SetRightMenu(ContextMenu);
         }
         #endregion
-
-        //private void PDFEditMultiActiveHandler(object sender, List<PDFEditEvent> e)
-        //{
-        //    imageArea = null;
-        //    lastPDFEditMultiEvents = e;
-        //    if(e==null)
-        //    {
-        //        PDFEditEmptyPanel();
-        //        return;
-        //    }
-
-        //    if(e.Count>1)
-        //    {
-        //       List<CPDFEditType> editList= e.AsEnumerable().Select(x=>x.EditType).Distinct().ToList();
-
-        //        if(editList.Count>1)
-        //        {
-        //            PDFEditEmptyPanel();
-        //            return;
-        //        }
-
-        //        if (editList[0]==CPDFEditType.EditText)
-        //        {
-        //            pdfContentEditControl.SetPDFTextMultiEditData(e);
-        //            return;
-        //        }
-
-        //        if (editList[0]==CPDFEditType.EditImage)
-        //        {
-        //            UIElement pageView = sender as UIElement;
-        //            if (pageView != null)
-        //            {
-        //                pageView.MouseLeftButtonUp += PageView_MouseLeftButtonUp;
-        //            }
-        //            pdfContentEditControl.SetPDFImageMultiEditData(e);
-        //        }
-        //    }
-        //}
-
-         
+        
         #region Property changed
         protected void OnPropertyChanged([CallerMemberName] string name = null)
         {
@@ -815,6 +777,7 @@ namespace Compdfkit_Tools.PDFControl
             else
             {
                 menu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Paste"), Command = ApplicationCommands.Paste, CommandTarget = (UIElement)sender });
+                menu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_MatchPaste"), Command = CustomCommands.PasteWithoutStyle, CommandTarget = (UIElement)sender });
             }
         }