Переглянути джерело

Merge branch 'dev' of http://git.kdan.cc:8865/Windows/PDFOffice_Windows_exe into dev

OYXH\oyxh 2 роки тому
батько
коміт
a8cc05e35d

+ 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="复制文本"

+ 13 - 12
PDF Office/ViewModels/Dialog/ToolsDialogs/MergeDialogViewModel.cs

@@ -244,31 +244,32 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
                 case PageSizeType.kDefault:
                     break;
                 case PageSizeType.A4:
-                    rect.Width = 210;
-                    rect.Height = 297;
+
+                    rect.Width = CommonHelper.GetPageSizeFomrUnit(210);
+                    rect.Height = CommonHelper.GetPageSizeFomrUnit(297);
                     break;
                 case PageSizeType.A3:
-                    rect.Width = 297;
-                    rect.Height = 420;
+                    rect.Width = CommonHelper.GetPageSizeFomrUnit(297);
+                    rect.Height = CommonHelper.GetPageSizeFomrUnit(420);
                     break;
                 case PageSizeType.Letter:
-                    rect.Width = 216;
-                    rect.Height = 279;
+                    rect.Width = CommonHelper.GetPageSizeFomrUnit(216);
+                    rect.Height = CommonHelper.GetPageSizeFomrUnit(279);
                     break;
                 case PageSizeType.Legal:
-                    rect.Width = 216;
-                    rect.Height = 356;
+                    rect.Width = CommonHelper.GetPageSizeFomrUnit(216);
+                    rect.Height = CommonHelper.GetPageSizeFomrUnit(356);
                     break;
                 case PageSizeType.Customized:
                     if (!string.IsNullOrEmpty(InputWidth) && !string.IsNullOrEmpty(InputHeight))
                     {
-                        rect.Width = Convert.ToInt32(InputWidth);
-                        rect.Height = Convert.ToInt32(InputHeight);
+                        rect.Width = CommonHelper.GetPageSizeFomrUnit(Convert.ToInt32(InputWidth));
+                        rect.Height = CommonHelper.GetPageSizeFomrUnit(Convert.ToInt32(InputHeight));
                     }
                     else
                     {
-                        rect.Width = 595;
-                        rect.Height = 841;
+                        rect.Width = CommonHelper.GetPageSizeFomrUnit(595);
+                        rect.Height = CommonHelper.GetPageSizeFomrUnit(841);
                     }
                     break;
                 default:

+ 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

@@ -241,6 +241,30 @@ namespace PDF_Office.ViewModels.Tools
         public DelegateCommand<object> SetAddAnnotationCommand { get; set; }
         public DelegateCommand AddBookMarkCommand { 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

@@ -60,6 +60,25 @@ namespace PDF_Office.ViewModels.Tools
             SetAddAnnotationCommand = new DelegateCommand<object>(AddAnnotation_Click);
             AddBookMarkCommand = new DelegateCommand(AddBookMark_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 初始化

+ 170 - 64
PDF Office/Views/Dialog/ToolsDialogs/MergeDialog.xaml

@@ -16,13 +16,68 @@
         <dataconvert:UnVisivleConvert x:Key="UnVisivleConvert" />
         <dataconvert:ListCountToVisible x:Key="ListCountToVisible"/>
         <dataconvert:UnVisibleToBoolConvert x:Key="UnVisibleToBoolConvert"/>
+        <PathGeometry x:Key="Ic_ClearButtonPath" Figures="M6 1.75H10V0.25H6V1.75ZM1 4.25H2.25V15C2.25 15.4142 2.58579 15.75 3 15.75H13C13.4142 15.75 13.75 15.4142 13.75 15V4.25H15V2.75H1V4.25ZM3.75 14.25V4.25H12.25V14.25H3.75ZM7.25 6.5V11.5H8.75V6.5H7.25Z" />
+        <PathGeometry x:Key="Ic_DeleteButtonPath" Figures="M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.5303 5.53038L9.06069 8L11.5303 10.4696L10.4697 11.5303L8.00002 9.06066L5.53033 11.5303L4.46967 10.4697L6.93936 8L4.46967 5.53033L5.53033 4.46967L8.00002 6.93934L10.4697 4.46971L11.5303 5.53038Z" />
+        <SolidColorBrush x:Key="Item.MouseOver.Background" Color="#1F26A0DA"/>
+        <SolidColorBrush x:Key="Item.MouseOver.Border" Color="#a826A0Da"/>
+        <SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#3DDADADA"/>
+        <SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="#FFDADADA"/>
+        <SolidColorBrush x:Key="Item.SelectedActive.Background" Color="#3D26A0DA"/>
+        <SolidColorBrush x:Key="Item.SelectedActive.Border" Color="#FF26A0DA"/>
+        <Style x:Key="ListViewItemStyle1" TargetType="{x:Type ListViewItem}">
+            <Setter Property="SnapsToDevicePixels" Value="True"/>
+            <Setter Property="Padding" Value="0,2,0,0"/>
+            <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
+            <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
+            <Setter Property="Background" Value="Transparent"/>
+            <Setter Property="BorderBrush" Value="Transparent"/>
+            <Setter Property="BorderThickness" Value="0"/>
+            <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
+            <Setter Property="Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="{x:Type ListViewItem}">
+                        <Border Grid.Row="2" CornerRadius="8" x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
+                                <ContentPresenter  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                            </Border>
+                            <ControlTemplate.Triggers>
+                            <MultiTrigger>
+                                <MultiTrigger.Conditions>
+                                    <Condition Property="IsMouseOver" Value="True"/>
+                                </MultiTrigger.Conditions>
+                                <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}"/>
+                                <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}"/>
+                            </MultiTrigger>
+                            <MultiTrigger>
+                                <MultiTrigger.Conditions>
+                                    <Condition Property="Selector.IsSelectionActive" Value="False"/>
+                                    <Condition Property="IsSelected" Value="True"/>
+                                </MultiTrigger.Conditions>
+                                <Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Background}"/>
+                                <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Border}"/>
+                            </MultiTrigger>
+                            <MultiTrigger>
+                                <MultiTrigger.Conditions>
+                                    <Condition Property="Selector.IsSelectionActive" Value="True"/>
+                                    <Condition Property="IsSelected" Value="True"/>
+                                </MultiTrigger.Conditions>
+                                <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}"/>
+                                <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}"/>
+                            </MultiTrigger>
+                            <Trigger Property="IsEnabled" Value="False">
+                                <Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
+                            </Trigger>
+                        </ControlTemplate.Triggers>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+        </Style>
     </UserControl.Resources>
     <Grid Background="{StaticResource color.sys.layout.anti}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="16"/>
-            <ColumnDefinition Width="558"/>
-            <ColumnDefinition Width="260"/>
+            <ColumnDefinition Width="526"/>
             <ColumnDefinition Width="16"/>
+            <ColumnDefinition Width="260"/>
         </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
             <RowDefinition Height="16"/>
@@ -33,6 +88,14 @@
             <RowDefinition Height="50"/>
             <RowDefinition Height="16"/>
         </Grid.RowDefinitions>
+
+        <Border Grid.Column="1" Grid.Row="1"  Grid.RowSpan="2" Padding="50,6,50,6" Visibility="{Binding Visibility, Converter={StaticResource UnVisivleConvert}, ElementName=NoFileStackPanel}">
+            <Grid>
+                <TextBlock Text="File Name" HorizontalAlignment="Left" FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
+                <TextBlock Text="Page Range" HorizontalAlignment="Center" FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
+                <TextBlock Text="Size" HorizontalAlignment="Right" FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
+            </Grid>
+        </Border>
         <Border Grid.Column="1" Grid.Row="3">
             <Grid AllowDrop="True" Background="{StaticResource color.sys.layout.anti}"
                 PreviewDrop="Grid_Drop"
@@ -50,8 +113,10 @@
                     <TextBlock Text="Selected files" FontSize="14" FontFamily="Segoe UI" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                     <TextBlock Text="Drop files here or Click Add Files at bottom right button. You can drag files to reorder as you need." FontSize="14" FontFamily="Segoe UI" HorizontalAlignment="Center" TextAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap"/>
                 </StackPanel>
-                <ListView x:Name="MergeView" AllowDrop="True" 
-                Visibility="{Binding ElementName=NoFileStackPanel,Path=Visibility,Converter={StaticResource UnVisivleConvert}}"          
+                    <ListView x:Name="MergeView" AllowDrop="True"
+                ItemContainerStyle="{StaticResource ListViewItemStyle1}"
+                BorderThickness="0"
+                Visibility="{Binding Visibility, Converter={StaticResource UnVisivleConvert}, ElementName=NoFileStackPanel}"          
                 Drop="MergeView_Drop"
                 DragEnter="MergeView_DragEnter"
                 DragOver="MergeView_DragOver"
@@ -60,107 +125,134 @@
                 ItemsSource="{Binding MergeObjectlist}"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                 HorizontalContentAlignment="Stretch">
-                    <ListView.ItemTemplate>
-                        <DataTemplate  >
-                            <Grid x:Name="ContentPanel" >
-                                <Grid.ColumnDefinitions>
-                                    <ColumnDefinition Width="Auto"/>
-                                    <ColumnDefinition Width="*"/>
-                                    <ColumnDefinition Width="*"/>
-                                    <ColumnDefinition Width="*"/>
-                                    <ColumnDefinition Width="*"/>
-                                    <ColumnDefinition Width="*"/>
-                                </Grid.ColumnDefinitions>
-                                <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, 
-                                         AncestorType={x:Type ListViewItem}}, 
-                                         Converter={StaticResource IndexConverter}}"
-                                 VerticalAlignment="Center"  HorizontalAlignment="Center"/>
-                                <Image Grid.Column="1" Width="50" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center" Source="{Binding DocThumbnail}"  Stretch="Uniform"  />
-                                <StackPanel Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center">
-                                    <TextBlock Text="{Binding DocName}" TextTrimming="CharacterEllipsis"/>
-                                    <TextBlock Text="{Binding DocPageCount}" />
-                                </StackPanel>
-                                <StackPanel Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center">
-                                    <customcontrol:WritableComboBox SelectedIndex="0" MaxPageRange="{Binding SDKPageCount}" Text="{Binding SetPageRange,Mode=TwoWay}"/>
-                                </StackPanel>
-                                <TextBlock Grid.Column="4" Text="{Binding DocSize}"  HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                                <StackPanel Grid.Column="5" VerticalAlignment="Center">
-                                    <Button Content="删除" Click="Delete_Click"/>
-                                </StackPanel>
+                        <ListView.ItemTemplate>
+                            <DataTemplate  >
+                                <StackPanel>
+                                    <Line  X1="0"  X2="{Binding ActualWidth, ElementName=ContentPanel}" HorizontalAlignment="Stretch" StrokeThickness="1" Stroke="{StaticResource color.item-state.hov.bg}" VerticalAlignment="Bottom"/>
+                                    <Grid x:Name="ContentPanel" Height="76" >
+                                        <Grid.ColumnDefinitions>
+                                            <ColumnDefinition Width="40"/>
+                                            <ColumnDefinition Width="60"/>
+                                            <ColumnDefinition Width="141"/>
+                                            <ColumnDefinition Width="auto"/>
+                                            <ColumnDefinition Width="*"/>
+                                            <ColumnDefinition Width="16"/>
+                                            <ColumnDefinition Width="16"/>
+                                        </Grid.ColumnDefinitions>
+                                        <Line   Margin="0,0,0,0" Grid.ColumnSpan="6" Visibility="{Binding IsForward, Converter={StaticResource BoolToVisible}}" X1="0"  X2="{Binding ActualWidth, ElementName=ContentPanel}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" StrokeThickness="1" Stroke="{StaticResource color.sys.layout.accent}" />
 
-                                <StackPanel Grid.ColumnSpan="5" Visibility="{Binding IsForward, Converter={StaticResource BoolToVisible}}" Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
-                                    <Line  Margin="0,0,0,0" X1="0"  X2="{Binding ElementName=ContentPanel,Path=ActualWidth}" HorizontalAlignment="Stretch" StrokeThickness="1.5" Stroke="#FF0078D7" VerticalAlignment="Bottom"/>
-                                </StackPanel>
+                                        <Line Margin="0,0,0,0" Grid.ColumnSpan="6" Visibility="{Binding IsBackwards, Converter={StaticResource BoolToVisible}}"  X1="0"  X2="{Binding ActualWidth, ElementName=ContentPanel}" HorizontalAlignment="Stretch" VerticalAlignment="Top" StrokeThickness="1" Stroke="{StaticResource color.sys.layout.accent}" />
 
-                                <StackPanel Grid.ColumnSpan="5" Visibility="{Binding IsBackwards, Converter={StaticResource BoolToVisible}}" Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Top">
-                                    <Line  X1="0"  X2="{Binding ElementName=ContentPanel,Path=ActualWidth}" HorizontalAlignment="Stretch" StrokeThickness="1.5" Stroke="Red" VerticalAlignment="Bottom"/>
+                                        <TextBlock Text="{Binding Converter={StaticResource IndexConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}}"
+                                 VerticalAlignment="Center"  HorizontalAlignment="Center"/>
+                                        <Image Margin="8" Grid.Column="1"  HorizontalAlignment="Stretch" VerticalAlignment="Center" Source="{Binding DocThumbnail}"  Stretch="Uniform"  />
+                                        <StackPanel Grid.Column="2" Margin="16,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Center">
+                                            <TextBlock Text="{Binding DocName}" FontFamily="Segoe UI" FontSize="14" FontWeight="Regular" Foreground="{StaticResource color.sys.text.neutral.lv1}"  TextTrimming="CharacterEllipsis"/>
+                                            <TextBlock Text="{Binding DocPageCount}"  FontFamily="Segoe UI" FontSize="14" FontWeight="Regular" Foreground="{StaticResource color.sys.text.neutral.lv3}"/>
+                                        </StackPanel>
+                                        <StackPanel Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="16,0,0,0">
+                                            <customcontrol:WritableComboBox SelectedIndex="0" Width="150" Height="30" MaxPageRange="{Binding SDKPageCount}" Text="{Binding SetPageRange, Mode=TwoWay}"/>
+                                        </StackPanel>
+                                        <TextBlock Grid.Column="4" Text="{Binding DocSize}"  HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="16,0,0,0"/>
+                                        <StackPanel Grid.Column="5" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="0,0">
+
+                                            <customcontrol:PathButton
+            Visibility="Collapsed"
+            HorizontalAlignment="Center"
+            VerticalAlignment="Center"
+            VerticalContentAlignment="Center"
+            x:Name="DeleteIcon"
+            Width="16" Height="16"
+           Click="Delete_Click"
+            Icon="{StaticResource Ic_DeleteButtonPath}" IconFill="#616469"
+            IconHeight="16" IconWidth="16"
+            IconMouseOver="{StaticResource Ic_DeleteButtonPath}" IconMouseOverFill="#616469"
+            IconPress="{StaticResource Ic_DeleteButtonPath}" IconPressFill="#616469"
+            CornerRadius="4"  HorizontalContentAlignment="Center"
+            MouseOverBackground="{StaticResource color.item-state.hov.bg}"
+            MouseDownBackground="{StaticResource color.item-state.sel.bg.lv3}"                          
+            MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
+                    />
+                                        </StackPanel>
+                                    </Grid>
                                 </StackPanel>
-                            </Grid>
+                            <DataTemplate.Triggers>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter TargetName="DeleteIcon" Property="Visibility" Value="Visible" />
+                                </Trigger>
+                            </DataTemplate.Triggers>
                         </DataTemplate>
-                    </ListView.ItemTemplate>
-                </ListView>
+                        </ListView.ItemTemplate>
+                    </ListView>
             </Grid>
         </Border>
-        <Border Grid.Column="2" Grid.Row="3">
+        <Border Grid.Column="3" Grid.RowSpan="7" Background="{StaticResource color.sys.layout.mg}">
             <Grid>
                 <Grid.RowDefinitions>
-                    <RowDefinition Height="20"/>
+                    <RowDefinition Height="14"/>
                     <RowDefinition Height="*"/>
+                    <RowDefinition Height="auto"/>
+                    <RowDefinition Height="16"/>
                 </Grid.RowDefinitions>
-                <TextBlock Text=" Page Size"/>
-                <StackPanel Grid.Row="1">
-                    <RadioButton Content="Original page size" Tag="0">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="16"/>
+                    <ColumnDefinition Width="*"/>
+                    <ColumnDefinition Width="16"/>
+                </Grid.ColumnDefinitions>
+                <StackPanel Grid.Row="1" Grid.Column="1">
+                    <TextBlock Text=" Page Size" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
+                    <RadioButton Content="Original page size" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Tag="0" Margin="0,14,0,0">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
                             </i:EventTrigger>
                         </i:Interaction.Triggers>
                     </RadioButton>
-                    <RadioButton Content="A4" Tag="1">
+                    <RadioButton Content="A4" Tag="1" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
                             </i:EventTrigger>
                         </i:Interaction.Triggers>
                     </RadioButton>
-                    <RadioButton Content="A3" Tag="2">
+                    <RadioButton Content="A3" Tag="2" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
                             </i:EventTrigger>
                         </i:Interaction.Triggers>
                     </RadioButton>
-                    <RadioButton Content="U.S.Letter" Tag="3">
+                    <RadioButton Content="U.S.Letter" Tag="3" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
                             </i:EventTrigger>
                         </i:Interaction.Triggers>
                     </RadioButton>
-                    <RadioButton Content="U.S.Legal" Tag="4">
+                    <RadioButton Content="U.S.Legal" Tag="4" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
                             </i:EventTrigger>
                         </i:Interaction.Triggers>
                     </RadioButton>
-                    <RadioButton x:Name="Customized" Content="Customized" Tag="5">
+                    <RadioButton x:Name="Customized" Content="Customized" Tag="5" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
                             </i:EventTrigger>
                         </i:Interaction.Triggers>
                     </RadioButton>
-                    <Grid IsEnabled="{Binding ElementName=Customized, Path=IsChecked}">
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="*"/>
-                            <ColumnDefinition Width="20"/>
-                            <ColumnDefinition Width="*"/>
-                        </Grid.ColumnDefinitions>
-                        <customcontrol:TextBoxEx PreviewKeyDown="TextBoxEx_PreviewKeyDown" x:Name="TextWidth" PlaceholderText="595" Text="{Binding InputWidth,Mode=TwoWay}"  PreviewTextInput="TextBox_PreviewTextInput" LostFocus="TextBoxEx_LostFocus"/>
-                        <TextBlock Text="X" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                        <customcontrol:TextBoxEx PreviewKeyDown="TextBoxEx_PreviewKeyDown" x:Name="TextHeight" PlaceholderText="841" Grid.Column="2" Text="{Binding InputHeight,Mode=TwoWay}" PreviewTextInput="TextBox_PreviewTextInput" LostFocus="TextBoxEx_LostFocus"/>
-                    </Grid>
+                    <StackPanel IsEnabled="{Binding ElementName=Customized, Path=IsChecked}" Margin="0,8,0,0" Orientation="Horizontal" HorizontalAlignment="Stretch">
+                        <customcontrol:TextBoxEx Width="85" PreviewKeyDown="TextBoxEx_PreviewKeyDown" x:Name="TextWidth" PlaceholderText="595" Text="{Binding InputWidth,Mode=TwoWay}"  PreviewTextInput="TextBox_PreviewTextInput" LostFocus="TextBoxEx_LostFocus"/>
+                        <TextBlock Text="X" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="8,0"/>
+                        <customcontrol:TextBoxEx Width="85" PreviewKeyDown="TextBoxEx_PreviewKeyDown" x:Name="TextHeight" PlaceholderText="841" Grid.Column="2" Text="{Binding InputHeight,Mode=TwoWay}" PreviewTextInput="TextBox_PreviewTextInput" LostFocus="TextBoxEx_LostFocus"/>
+                        <TextBlock Text="mm" VerticalAlignment="Center" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="8,0,0,0"/>
+                    </StackPanel>
+                </StackPanel>
+                <StackPanel Grid.Column="1" Grid.Row="2"  HorizontalAlignment="Center" VerticalAlignment="Bottom">
+                    <Button x:Name="BtnMerge" Width="228" Content="Merge"  Height="32" Style="{StaticResource Btn.cta}" Command="{Binding MergeCommand}" IsEnabled="{Binding ElementName=NoFileStackPanel,Path=Visibility,Converter={StaticResource UnVisibleToBoolConvert}}"/>
+                    <Button Margin="0,16,0,0" Width="228" Content="Cancel" Height="32" Style="{StaticResource btn.sec}" Command="{Binding CancelCommand}"/>
                 </StackPanel>
             </Grid>
         </Border>
@@ -201,10 +293,24 @@
 
             </ComboBoxItem>
         </ComboBox>
-        <Button Grid.Column="1" Grid.Row="5"  Content="Clear"  HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="80" Height="32" Style="{StaticResource btn.sec}" Command="{Binding ClearCommand}"/>
-        <StackPanel Grid.Column="2" Grid.RowSpan="2" Grid.Row="4"  HorizontalAlignment="Center" VerticalAlignment="Bottom">
-            <Button x:Name="BtnMerge" Content="Merge" Width="80" Height="32" Style="{StaticResource Btn.cta}" Command="{Binding MergeCommand}" IsEnabled="{Binding ElementName=NoFileStackPanel,Path=Visibility,Converter={StaticResource UnVisibleToBoolConvert}}"/>
-            <Button Content="Cancel" Width="80" Height="32" Style="{StaticResource btn.sec}" Command="{Binding CancelCommand}"/>
-        </StackPanel>
+        <Border BorderThickness="1" Width="32" Height="32" Grid.Column="1" Grid.Row="5" BorderBrush="{StaticResource color.btn.sec.border-color}" 
+            HorizontalAlignment="Right" VerticalAlignment="Bottom" CornerRadius="4">
+            <customcontrol:PathButton
+            HorizontalAlignment="Center"
+            VerticalAlignment="Center"
+            VerticalContentAlignment="Center"
+            x:Name="BtnAdd"
+            Width="32" Height="32"
+            Command="{Binding ClearCommand}"
+            Icon="{StaticResource Ic_ClearButtonPath}" IconFill="#616469"
+            IconHeight="16" IconWidth="16"
+            IconMouseOver="{StaticResource Ic_ClearButtonPath}" IconMouseOverFill="#616469"
+            IconPress="{StaticResource Ic_ClearButtonPath}" IconPressFill="#616469"
+            CornerRadius="4"  HorizontalContentAlignment="Center"
+            MouseOverBackground="{StaticResource color.item-state.hov.bg}"
+            MouseDownBackground="{StaticResource color.item-state.sel.bg.lv3}"                          
+            MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
+                    />
+        </Border>
     </Grid>
 </UserControl>