Browse Source

填写与签名 - 多选右键菜单

chenrongqian@kdanmobile.com 2 years ago
parent
commit
a8bda8c548
1 changed files with 25 additions and 1 deletions
  1. 25 1
      PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs

+ 25 - 1
PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs

@@ -115,6 +115,7 @@ namespace PDF_Office.ViewModels.FillAndSign
             FreeTextAglin_MenuCommand = new DelegateCommand<object>(FreeTextAglin_Menu);
             InitSelectFreeHandAnnotMenu();
             InitSelectFreeTextAnnotMenu();
+            InitSelectMultiAnnotMenu();
             SubscribeEvent();
         }
 
@@ -1037,8 +1038,31 @@ namespace PDF_Office.ViewModels.FillAndSign
             menuItem.Header = "设置当前属性为默认值";
             pop.BindingEvent(pop.AddItem(menuItem), AnnotDefaultValue_MenuCommand);
             FreeTextAnnotPopMenu = pop;
-        }
+        }
 
+        /// <summary>
+        /// 多选注释
+        /// </summary>
+        private void InitSelectMultiAnnotMenu()
+        {
+            var popMenu = new ContextMenu();
+            PopMenu pop = new PopMenu(popMenu);
+            var menuItem = new MenuItem();
+            menuItem.Name = "MultiCopy";
+            menuItem.Header = "复制";
+            pop.BindingEvent(pop.AddItem(menuItem), ApplicationCommands.Copy);
+
+            menuItem = new MenuItem();
+            menuItem.Name = "MultiCut";
+            menuItem.Header = "剪切";
+            pop.BindingEvent(pop.AddItem(menuItem), ApplicationCommands.Cut);
+
+            menuItem = new MenuItem();
+            menuItem.Name = "MultiDelete";
+            menuItem.Header = "删除";
+            pop.BindingEvent(pop.AddItem(menuItem), ApplicationCommands.Delete);
+            MultiAnnotPopMenu = pop;
+        }
         private Separator GetSeparator()
         {
             Separator separator = new Separator();