Browse Source

注释 - 右键菜单事件

chenrongqian@kdanmobile.com 2 years ago
parent
commit
61fcea1a2e

+ 7 - 2
PDF Office/Helper/PopControlHelper.cs

@@ -314,8 +314,13 @@ namespace PDF_Office.Helper
         //设置UI内容
         public void SetMenuUI(int index, UIElement controls)
         {
-            PopMenu.Items.Insert(index, controls);
-            GetMenuItems();
+            var menuItem = ContainterOfIndex(index);
+
+            if (menuItem != null)
+            {
+                menuItem.Header = controls;
+            }
+
         }
 
         //按索引号设置菜单

+ 13 - 2
PDF Office/Styles/ContextMenuStyle.xaml

@@ -39,6 +39,18 @@
     </ContextMenu>
 
     <!--注释 - 高亮、下划线、删除线 -右键菜单-->
+    <Style x:Key="UIElementMenuItem" TargetType="MenuItem">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="MenuItem">
+                    <Grid Height="24" Background="#FBFBFD" Width="{TemplateBinding Width}">
+                        <ContentPresenter Content="{TemplateBinding Header}"/>
+                    </Grid>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
     <ContextMenu x:Key="HightAnnotContextMenu" FontSize="14">
         <ContextMenu.ItemContainerStyle>
             <Style TargetType="MenuItem">
@@ -48,10 +60,9 @@
         </ContextMenu.ItemContainerStyle>
         <MenuItem
             Name="HightColorAnnotMenuItem"
-            Header="颜色列表"
+            Header="颜色列表" Style="{StaticResource UIElementMenuItem}"
             IsEnabled="True">
         </MenuItem>
-
         <MenuItem
             Name="CopyTextMenuItem"
             Header="复制文本"

+ 1 - 1
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -381,7 +381,7 @@ namespace PDF_Office.ViewModels.Tools
                                     case AnnotArgsType.AnnotUnderline:
                                     case AnnotArgsType.AnnotStrikeout:
                                     case AnnotArgsType.AnnotSquiggly:
-                                        e.PopupMenu = SelectHightAnnotMenu(sender);
+                                        e.PopupMenu = SelectHightAnnotMenu(selectedAnnot);
                                         break;
                                     case AnnotArgsType.AnnotFreehand:
                                         e.PopupMenu = SelectFreeHandAnnotMenu(sender);

+ 193 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Function.cs

@@ -7,6 +7,7 @@ using Microsoft.Office.Core;
 using Microsoft.Win32;
 using PDF_Office.CustomControl;
 using PDF_Office.Helper;
+using PDF_Office.Model;
 using PDF_Office.Model.BOTA;
 using PDF_Office.Properties;
 using PDF_Office.ViewModels.BOTA;
@@ -16,6 +17,7 @@ using PDF_Office.Views.PropertyPanel.AnnotPanel;
 using PDFSettings;
 using Prism.Mvvm;
 using Prism.Regions;
+using Prism.Services.Dialogs;
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -1012,6 +1014,197 @@ namespace PDF_Office.ViewModels.Tools
             }
         }
 
+
+
+        #region 注释右键菜单事件
+        //高亮、下划线、删除
+        private void HightAnnotCopyText_Menu(object obj)
+        {
+            if (obj != null && obj as AnnotationHandlerEventArgs != null)
+            {
+                var annot = (AnnotationHandlerEventArgs)obj;
+                System.Windows.Clipboard.SetText(annot.Content);
+            }
+        }
+
+        //更改为当前注释属性默认值
+        private void AnnotDefaultValues_Menu(object obj)
+        {
+            if (obj != null && obj as AnnotHandlerEventArgs != null)
+            {
+               
+                var annot = (AnnotHandlerEventArgs)obj;
+                var AnnotEvent = AnnotAttribEvent.GetAnnotAttribEvent(annot, annot.GetAnnotAttrib());
+                if (annot is TextHighlightAnnotArgs)
+                {
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color,Settings.Default.AppProperties.Annotate.HighLightColor);
+                }
+                else if(annot is TextUnderlineAnnotArgs)
+                {
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.UnderLineColor);
+                }
+                else if (annot is TextStrikeoutAnnotArgs)
+                {
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.StrikethroughColor);
+                }
+                else if (annot is FreehandAnnotArgs)
+                {
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.FreeHandColor);
+                }
+                else if (annot is FreeTextAnnotArgs)
+                {
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.TextAnnoteColor);
+                   // AnnotEvent?.UpdateAttrib(AnnotAttrib.FontFamily, Settings.Default.AppProperties.Annotate.TextFontFamaily);
+                   // AnnotEvent?.UpdateAttrib(AnnotAttrib.TextAlign, Settings.Default.AppProperties.Annotate.TextAlign);
+                }
+                else if (annot is StickyAnnotArgs)
+                {
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.NoteAnnoteColor);
+                }
+                else if (annot is SquareAnnotArgs)
+                {
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.FillColor, Settings.Default.AppProperties.Annotate.RectangleFillColor);
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.RectangleBorderColor);
+                }
+                else if (annot is CircleAnnotArgs)
+                {
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.FillColor, Settings.Default.AppProperties.Annotate.CircleFillColor);
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.CircleBorderColor);
+                }
+                else if (annot is LineAnnotArgs)
+                {
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, Settings.Default.AppProperties.Annotate.LineColor);
+                }
+
+                AnnotEvent?.UpdateAnnot();
+            }
+        }
+
+        //更改颜色
+        private void AnnotColorPalette_Menu(object obj)
+        {
+            if (obj != null && obj as AnnotHandlerEventArgs != null)
+            {
+                var annot = obj as AnnotHandlerEventArgs;
+
+                var item = new ColorDropBoxPop();
+                item.DataContext = annot;
+                item.ColorSelected -= AnnotMenu_ColorSelected;
+                item.ColorSelected += AnnotMenu_ColorSelected;
+                System.Windows.Controls.Primitives.Popup popup = new System.Windows.Controls.Primitives.Popup();
+                popup.Child = item;
+                popup.PlacementRectangle = new Rect(Mouse.GetPosition(App.Current.MainWindow), new Size(item.Width, item.Height));
+                popup.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom;
+                popup.IsOpen = true;
+            }
+
+        }
+        
+        private void AnnotMenu_ColorSelected(object sender, Color e)
+        {
+            if (sender != null)
+            {
+                var annot = (sender as FrameworkElement).DataContext as AnnotHandlerEventArgs;
+                if (annot != null)
+                {
+                    var AnnotEvent = AnnotAttribEvent.GetAnnotAttribEvent(annot, annot.GetAnnotAttrib());
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, e);
+                    AnnotEvent?.UpdateAnnot();
+                }
+            }
+        }
+        //添加笔记
+        private void AnnotAddNoteText_Menu(object obj)
+        {
+            if (obj != null)
+            {
+                var annot = obj as AnnotHandlerEventArgs;
+                if (annot != null)
+                {
+
+                    DialogParameters value = new DialogParameters();
+                    value.Add(ParameterNames.Annotation, annot);
+                    dialogs.ShowDialog(DialogNames.AddAnnotationDialog, value, e =>
+                    {
+                        if (e.Result == ButtonResult.OK && e.Parameters != null)
+                        {
+                            PDFViewer.UndoManager.CanSave = true;
+                            if (e.Parameters.ContainsKey(ParameterNames.Annotation) && e.Parameters.ContainsKey(ParameterNames.AnnotEvent))
+                            {
+                            }
+                        }
+                    });
+                }
+            }
+        }
+
+        //手绘
+
+        private void FreeHandLineStyle_Menu(object obj)
+        {
+            if (obj != null)
+            {
+
+            }
+        }
+
+        //文本
+
+        private void FreeTextFontFamily_Menu(object obj)
+        {
+            if (obj != null)
+            {
+
+            }
+        }
+
+        private void FreeTextAglin_Menu(object obj)
+        {
+            if (obj != null)
+            {
+
+            }
+        }
+
+        //便签
+
+        private void StrikeNoteEditStrike_Menu(object obj)
+        {
+            if (obj != null)
+            {
+
+            }
+        }
+
+        //形状
+
+        private void ShapeLineStyle_Menu(object obj)
+        {
+            if (obj != null)
+            {
+
+            }
+        }
+
+        private void ShapeLineDirect_Menu(object obj)
+        {
+            if (obj != null)
+            {
+
+            }
+        }
+
+        private void ShapeDefaultValues_Menu(object obj)
+        {
+            if (obj != null)
+            {
+
+            }
+        }
+
+        #endregion 注释右键菜单事件
+
+
         #endregion 菜单
     }
 }

+ 76 - 53
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Layout.cs

@@ -1,6 +1,7 @@
 using ComPDFKit.PDFDocument;
 using ComPDFKitViewer;
 using ComPDFKitViewer.AnnotEvent;
+using PDF_Office.CustomControl.CompositeControl;
 using PDF_Office.Helper;
 using Prism.Mvvm;
 using Prism.Regions;
@@ -341,18 +342,40 @@ namespace PDF_Office.ViewModels.Tools
             var popMenu = App.Current.FindResource("HightAnnotContextMenu") as ContextMenu;
             CustomPopMenu customMenu = new CustomPopMenu(popMenu, sender);
             //颜色列表
-            customMenu.SetMenuBinding(0, ApplicationCommands.Copy);
+            ColorContent colorContent = new ColorContent();
+            colorContent.DataContext = sender;
+            colorContent.SelectedColorHandler -= colorContent_SelectedColorHandler;
+            colorContent.SelectedColorHandler += colorContent_SelectedColorHandler;
+            customMenu.SetMenuUI(0,colorContent);
             //复制文本
-            customMenu.SetMenuBinding(1, ApplicationCommands.Copy);
+            customMenu.SetMenuBinding(1, HightAnnotCopyText_MenuCommand);
             //删除
-            customMenu.SetMenuBinding(2, ApplicationCommands.Cut);
+            customMenu.SetMenuBinding(2, ApplicationCommands.Delete);
             //添加笔记
-            customMenu.SetMenuBinding(3, ApplicationCommands.Paste);
+            customMenu.SetMenuBinding(3, AnnotAddNoteText_MenuCommand);
             //设置当前属性为默认值
-            customMenu.SetMenuBinding(4, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(4, AnnotDefaultValue_MenuCommand);
             return popMenu;
         }
 
+        private void colorContent_SelectedColorHandler(object sender, Color e)
+        {
+            if (e == null) return;
+
+            var annot =(sender as FrameworkElement).DataContext as AnnotHandlerEventArgs;
+            if(annot != null)
+            {
+                var test = annot as TextHighlightAnnotArgs;
+                if(test != null)
+                {
+                    var anvent = AnnotAttribEvent.GetAnnotAttribEvent(test, test.GetAnnotAttrib());
+                    anvent.UpdateAttrib(AnnotAttrib.Color, e);
+                    anvent.UpdateAnnot();
+                }
+               
+            }
+        }
+
         //手绘
         private ContextMenu SelectFreeHandAnnotMenu(object sender)
         {
@@ -361,20 +384,20 @@ namespace PDF_Office.ViewModels.Tools
             //复制
             customMenu.SetMenuBinding(0, ApplicationCommands.Copy);
             //剪切
-            customMenu.SetMenuBinding(1, ApplicationCommands.Copy);
+            customMenu.SetMenuBinding(1, ApplicationCommands.Cut);
             //粘贴
-            customMenu.SetMenuBinding(2, ApplicationCommands.Cut);
+            customMenu.SetMenuBinding(2, ApplicationCommands.Paste);
             //删除
-            customMenu.SetMenuBinding(3, ApplicationCommands.Paste);
+            customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
             //颜色
-            customMenu.SetMenuBinding(4, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
             //线段样式
-            customMenu.SetSubMenuBinding(5, 0, ApplicationCommands.Delete);
-            customMenu.SetSubMenuBinding(5, 1, ApplicationCommands.Delete);
+            customMenu.SetSubMenuBinding(5, 0, ApplicationCommands.Delete);//
+            customMenu.SetSubMenuBinding(5, 1, ApplicationCommands.Delete);//
             //添加笔记
-            customMenu.SetMenuBinding(6, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(6, AnnotAddNoteText_MenuCommand);
             //设置当前属性为默认值
-            customMenu.SetMenuBinding(7, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(7, AnnotDefaultValue_MenuCommand);
             return popMenu;
         }
 
@@ -386,23 +409,23 @@ namespace PDF_Office.ViewModels.Tools
             //复制
             customMenu.SetMenuBinding(0, ApplicationCommands.Copy);
             //剪切
-            customMenu.SetMenuBinding(1, ApplicationCommands.Copy);
+            customMenu.SetMenuBinding(1, ApplicationCommands.Cut);
             //粘贴
-            customMenu.SetMenuBinding(2, ApplicationCommands.Cut);
+            customMenu.SetMenuBinding(2, ApplicationCommands.Paste);
             //删除
-            customMenu.SetMenuBinding(3, ApplicationCommands.Paste);
+            customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
             //文本颜色
-            customMenu.SetMenuBinding(4, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
             //字体
-            customMenu.SetSubMenuBinding(5, 0, ApplicationCommands.Delete);
-            customMenu.SetSubMenuBinding(5, 1, ApplicationCommands.Delete);
-            customMenu.SetSubMenuBinding(5, 2, ApplicationCommands.Delete);
+            customMenu.SetSubMenuBinding(5, 0, ApplicationCommands.Delete);//
+            customMenu.SetSubMenuBinding(5, 1, ApplicationCommands.Delete);//
+            customMenu.SetSubMenuBinding(5, 2, ApplicationCommands.Delete);//
             //文本对齐
-            customMenu.SetSubMenuBinding(6, 0, ApplicationCommands.Delete);
-            customMenu.SetSubMenuBinding(6, 1, ApplicationCommands.Delete);
-            customMenu.SetSubMenuBinding(6, 2, ApplicationCommands.Delete);
+            customMenu.SetSubMenuBinding(6, 0, ApplicationCommands.Delete);//
+            customMenu.SetSubMenuBinding(6, 1, ApplicationCommands.Delete);//
+            customMenu.SetSubMenuBinding(6, 2, ApplicationCommands.Delete);//
             //设置当前属性为默认值
-            customMenu.SetMenuBinding(7, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(7, AnnotDefaultValue_MenuCommand);
             return popMenu;
         }
 
@@ -414,17 +437,17 @@ namespace PDF_Office.ViewModels.Tools
             //复制
             customMenu.SetMenuBinding(0, ApplicationCommands.Copy);
             //剪切
-            customMenu.SetMenuBinding(1, ApplicationCommands.Copy);
+            customMenu.SetMenuBinding(1, ApplicationCommands.Cut);
             //粘贴
-            customMenu.SetMenuBinding(2, ApplicationCommands.Cut);
+            customMenu.SetMenuBinding(2, ApplicationCommands.Paste);
             //删除
-            customMenu.SetMenuBinding(3, ApplicationCommands.Paste);
+            customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
             //颜色
-            customMenu.SetMenuBinding(4, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
             //编辑便签
-            customMenu.SetMenuBinding(5, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(5, ApplicationCommands.Delete);//
             //设置当前属性为默认值
-            customMenu.SetMenuBinding(7, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(7, AnnotDefaultValue_MenuCommand);
             return popMenu;
         }
 
@@ -436,23 +459,23 @@ namespace PDF_Office.ViewModels.Tools
             //复制
             customMenu.SetMenuBinding(0, ApplicationCommands.Copy);
             //剪切
-            customMenu.SetMenuBinding(1, ApplicationCommands.Copy);
+            customMenu.SetMenuBinding(1, ApplicationCommands.Cut);
             //粘贴
-            customMenu.SetMenuBinding(2, ApplicationCommands.Cut);
+            customMenu.SetMenuBinding(2, ApplicationCommands.Paste);
             //删除
-            customMenu.SetMenuBinding(3, ApplicationCommands.Paste);
+            customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
             //颜色
-            customMenu.SetMenuBinding(4, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
             //线段样式
-            customMenu.SetSubMenuBinding(6, 0, ApplicationCommands.Delete);
-            customMenu.SetSubMenuBinding(6, 1, ApplicationCommands.Delete);
+            customMenu.SetSubMenuBinding(6, 0, ApplicationCommands.Delete);//
+            customMenu.SetSubMenuBinding(6, 1, ApplicationCommands.Delete);//
             //线段方向
-            customMenu.SetSubMenuBinding(7, 0, ApplicationCommands.Delete);
-            customMenu.SetSubMenuBinding(7, 1, ApplicationCommands.Delete);
+            customMenu.SetSubMenuBinding(7, 0, ApplicationCommands.Delete);//
+            customMenu.SetSubMenuBinding(7, 1, ApplicationCommands.Delete);//
             //添加笔记
-            customMenu.SetMenuBinding(8, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(8, AnnotAddNoteText_MenuCommand);
             //设置当前属性为默认值
-            customMenu.SetMenuBinding(8, ApplicationCommands.Delete);
+            customMenu.SetMenuBinding(8, AnnotDefaultValue_MenuCommand);
             return popMenu;
         }
 
@@ -464,11 +487,11 @@ namespace PDF_Office.ViewModels.Tools
             //复制
             customMenu.SetMenuBinding(0, ApplicationCommands.Copy);
             //剪切
-            customMenu.SetMenuBinding(1, ApplicationCommands.Copy);
+            customMenu.SetMenuBinding(1, ApplicationCommands.Cut);
             //粘贴
-            customMenu.SetMenuBinding(2, ApplicationCommands.Cut);
+            customMenu.SetMenuBinding(2, ApplicationCommands.Paste);
             //删除
-            customMenu.SetMenuBinding(3, ApplicationCommands.Paste);
+            customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
             return popMenu;
         }
 
@@ -480,17 +503,17 @@ namespace PDF_Office.ViewModels.Tools
             //复制
             customMenu.SetMenuBinding(0, ApplicationCommands.Copy);
             //剪切
-            customMenu.SetMenuBinding(1, ApplicationCommands.Copy);
+            customMenu.SetMenuBinding(1, ApplicationCommands.Cut);
             //粘贴
-            customMenu.SetMenuBinding(2, ApplicationCommands.Cut);
+            customMenu.SetMenuBinding(2, ApplicationCommands.Paste);
             //删除
-            customMenu.SetMenuBinding(3, ApplicationCommands.Paste);
+            customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
             //导出
-            customMenu.SetSubMenuBinding(4, 0, ApplicationCommands.Paste);
-            customMenu.SetSubMenuBinding(4, 1, ApplicationCommands.Paste);
-            customMenu.SetSubMenuBinding(4, 2, ApplicationCommands.Paste);
+            customMenu.SetSubMenuBinding(4, 0, ApplicationCommands.Paste);//
+            customMenu.SetSubMenuBinding(4, 1, ApplicationCommands.Paste);//
+            customMenu.SetSubMenuBinding(4, 2, ApplicationCommands.Paste);//
             //添加笔记
-            customMenu.SetMenuBinding(5, ApplicationCommands.Paste);
+            customMenu.SetMenuBinding(5, ApplicationCommands.Paste);//
             return popMenu;
         }
 
@@ -502,17 +525,17 @@ namespace PDF_Office.ViewModels.Tools
             if (isHightAnnot)
             {
                 customMenu.SetVisibilityProperty(0, false);
-                customMenu.SetVisibilityProperty(2, false);
+                customMenu.SetVisibilityProperty(1, false);
             }
             else
             {
                 //复制
                 customMenu.SetMenuBinding(0, ApplicationCommands.Copy);
                 //剪切
-                customMenu.SetMenuBinding(1, ApplicationCommands.Copy);
+                customMenu.SetMenuBinding(1, ApplicationCommands.Cut);
             }
             //删除
-            customMenu.SetMenuBinding(2, ApplicationCommands.Paste);
+            customMenu.SetMenuBinding(2, ApplicationCommands.Delete);
             return popMenu;
         }
 

+ 24 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Properties.cs

@@ -243,6 +243,30 @@ namespace PDF_Office.ViewModels.Tools
         public SnapshotEditMenuViewModel SnapshotEditMenuViewModel { get => snapshotEditMenuViewModel; set => snapshotEditMenuViewModel = value; }
         public DelegateCommand<object> SetAddAnnotationCommand { get; set; }
 
+        #region 注释 - 右键菜单
+        //公共
+        public DelegateCommand<object> AnnotDefaultValue_MenuCommand { get; set; }
+        public DelegateCommand<object> AnnotColorPalette_MenuCommand { get; set; }
+        public DelegateCommand<object> AnnotAddNoteText_MenuCommand { get; set; }
+        //高亮、下划线、删除
+        public DelegateCommand<object> HightAnnotCopyText_MenuCommand { get; set; }
+        
+        //手绘
+        public DelegateCommand<object> FreeHandLineStyle_MenuCommand { get; set; }
+
+        //文本
+        public DelegateCommand<object> FreeTextFontFamily_MenuCommand { get; set; }
+        public DelegateCommand<object> FreeTextAglin_MenuCommand { get; set; }
+
+        //便签
+        public DelegateCommand<object> StrikeNoteEditStrike_MenuCommand { get; set; }
+
+        //形状
+        public DelegateCommand<object> ShapeLineStyle_MenuCommand { get; set; }
+        public DelegateCommand<object> ShapeLineDirect_MenuCommand { get; set; }
+
+        #endregion 注释 - 右键菜单
+
         #endregion 事件
     }
 

+ 19 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs

@@ -59,6 +59,25 @@ namespace PDF_Office.ViewModels.Tools
             MyToolsCommand = new DelegateCommand<CustomIconToggleBtn>(BtnMyTools_Click);
             SetAddAnnotationCommand = new DelegateCommand<object>(AddAnnotation_Click);
             PropertyRegionName = Guid.NewGuid().ToString();
+
+            #region 注释 - 右键菜单
+            //公共command
+            AnnotDefaultValue_MenuCommand = new DelegateCommand<object>(AnnotDefaultValues_Menu);
+            AnnotColorPalette_MenuCommand = new DelegateCommand<object>(AnnotColorPalette_Menu);
+            AnnotAddNoteText_MenuCommand = new DelegateCommand<object>(AnnotAddNoteText_Menu);
+            //高亮、下划线、删除
+            HightAnnotCopyText_MenuCommand = new DelegateCommand<object>(HightAnnotCopyText_Menu);
+            //手绘
+            FreeHandLineStyle_MenuCommand = new DelegateCommand<object>(FreeHandLineStyle_Menu);
+            //文本
+            FreeTextFontFamily_MenuCommand = new DelegateCommand<object>(FreeTextFontFamily_Menu);
+            FreeTextAglin_MenuCommand = new DelegateCommand<object>(FreeTextAglin_Menu);
+            //便签
+            StrikeNoteEditStrike_MenuCommand = new DelegateCommand<object>(StrikeNoteEditStrike_Menu);
+            //形状
+            ShapeLineStyle_MenuCommand = new DelegateCommand<object>(ShapeLineStyle_Menu);
+            ShapeLineDirect_MenuCommand = new DelegateCommand<object>(ShapeLineDirect_Menu);
+            #endregion 注释 - 右键菜单
         }
 
         #endregion 初始化