Forráskód Böngészése

Merge branch 'dev' into practice

# Conflicts:
#	PDF Office/App.xaml.cs
#	PDF Office/PDF Office.csproj
#	PDF Office/SDKLisence.xml
#	PDF Office/Styles/CheckBoxStyle.xaml
liyijie 2 éve
szülő
commit
1b59ad758c
100 módosított fájl, 6807 hozzáadás és 1437 törlés
  1. 4 0
      PDF Office/App.xaml
  2. 75 29
      PDF Office/App.xaml.cs
  3. 33 0
      PDF Office/CustomControl/ColorDropBox.xaml
  4. 330 0
      PDF Office/CustomControl/ColorDropBox.xaml.cs
  5. 114 0
      PDF Office/CustomControl/ColorDropBoxPop.xaml
  6. 200 0
      PDF Office/CustomControl/ColorDropBoxPop.xaml.cs
  7. 69 0
      PDF Office/CustomControl/CompositeControl/ColorContent.xaml
  8. 174 0
      PDF Office/CustomControl/CompositeControl/ColorContent.xaml.cs
  9. 19 0
      PDF Office/CustomControl/CompositeControl/SlidContent.xaml
  10. 283 0
      PDF Office/CustomControl/CompositeControl/SlidContent.xaml.cs
  11. 81 0
      PDF Office/CustomControl/CompositeControl/SlidContentPop.xaml
  12. 34 0
      PDF Office/CustomControl/CompositeControl/SlidContentPop.xaml.cs
  13. 2 0
      PDF Office/CustomControl/DialogContent.cs
  14. 2 2
      PDF Office/CustomControl/NumericUpDown.xaml.cs
  15. 30 16
      PDF Office/CustomControl/WritableComboBox.xaml
  16. 25 0
      PDF Office/CustomControl/WritableComboBox.xaml.cs
  17. 31 0
      PDF Office/DataConvert/FileToImageSourceConvert.cs
  18. 38 0
      PDF Office/DataConvert/InvertBoolConvert.cs
  19. 35 0
      PDF Office/DataConvert/ObjectConvert.cs
  20. 79 0
      PDF Office/DataConvert/PropertyPanelVisible.cs
  21. 65 0
      PDF Office/DataConvert/StringToVisibleConvert.cs
  22. 8 2
      PDF Office/DataConvert/UnVisivleConvert.cs
  23. 38 0
      PDF Office/EventAggregators/PageEditNotifyEvent.cs
  24. 204 0
      PDF Office/Helper/AdvancedInvokeCommandAction.cs
  25. 624 0
      PDF Office/Helper/ArrowHelper.cs
  26. 57 5
      PDF Office/Views/HomePanel/PDFTools/PDFTools.cs
  27. 28 0
      PDF Office/Helper/SetterAction.cs
  28. 14 14
      PDF Office/Helper/SettingHelper.cs
  29. 241 5
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageSplitDialogModel.cs
  30. 9 4
      PDF Office/Model/DialogNames.cs
  31. 0 28
      PDF Office/Model/HomePageToolsDialogs/HomePageExtractDialogModel.cs
  32. 0 22
      PDF Office/Model/HomePageToolsDialogs/HomePageInsertDialogModel.cs
  33. 0 58
      PDF Office/Model/HomePageToolsDialogs/HomePageSplitDialogModel.cs
  34. 0 28
      PDF Office/Model/MainPageToolsDialogs/MainPageExtractDialogModel.cs
  35. 0 26
      PDF Office/Model/MainPageToolsDialogs/MainPageInsertDialogModel.cs
  36. 0 44
      PDF Office/Model/MainPageToolsDialogs/MainPageSplitDialogModel.cs
  37. 12 2
      PDF Office/Model/PDFTool/ToolItem.cs
  38. 26 0
      PDF Office/Model/PageEdit/CustomInsertModel.cs
  39. 24 0
      PDF Office/Model/PageEdit/CustomPageItem.cs
  40. 28 6
      PDF Office/Model/ParameterNames.cs
  41. 150 1
      PDF Office/Model/RegionNames.cs
  42. 296 27
      PDF Office/PDF Office.csproj
  43. 10 10
      PDF Office/Properties/Resources.Designer.cs
  44. 44 0
      PDF Office/Properties/Settings.Designer.cs
  45. 12 0
      PDF Office/Properties/Settings.settings
  46. BIN
      PDF Office/Resources/BOTA/empty_bookmark.png
  47. BIN
      PDF Office/Resources/HomeIcon/PDFTools/background.png
  48. BIN
      PDF Office/Resources/HomeIcon/PDFTools/batch-remove.png
  49. BIN
      PDF Office/Resources/HomeIcon/PDFTools/batch.png
  50. BIN
      PDF Office/Resources/HomeIcon/PDFTools/batesnumbers.png
  51. BIN
      PDF Office/Resources/HomeIcon/PDFTools/compare.png
  52. BIN
      PDF Office/Resources/HomeIcon/PDFTools/compress.png
  53. BIN
      PDF Office/Resources/HomeIcon/PDFTools/convert.png
  54. BIN
      PDF Office/Resources/HomeIcon/PDFTools/extract.png
  55. BIN
      PDF Office/Resources/HomeIcon/PDFTools/form-filed-recognition.png
  56. BIN
      PDF Office/Resources/HomeIcon/PDFTools/header&footer.png
  57. BIN
      PDF Office/Resources/HomeIcon/PDFTools/image.png
  58. BIN
      PDF Office/Resources/HomeIcon/PDFTools/insert.png
  59. BIN
      PDF Office/Resources/HomeIcon/PDFTools/merge.png
  60. BIN
      PDF Office/Resources/HomeIcon/PDFTools/ocr.png
  61. BIN
      PDF Office/Resources/HomeIcon/PDFTools/page-edit.png
  62. BIN
      PDF Office/Resources/HomeIcon/PDFTools/pdf-to-excel.png
  63. BIN
      PDF Office/Resources/HomeIcon/PDFTools/pdf-to-image.png
  64. BIN
      PDF Office/Resources/HomeIcon/PDFTools/pdf-to-ppt.png
  65. BIN
      PDF Office/Resources/HomeIcon/PDFTools/pdf-to-word.png
  66. BIN
      PDF Office/Resources/HomeIcon/PDFTools/print.png
  67. BIN
      PDF Office/Resources/HomeIcon/PDFTools/reduct.png
  68. BIN
      PDF Office/Resources/HomeIcon/PDFTools/security.png
  69. BIN
      PDF Office/Resources/HomeIcon/PDFTools/split.png
  70. BIN
      PDF Office/Resources/HomeIcon/PDFTools/watermark.png
  71. BIN
      PDF Office/Resources/PageEdit/GridLine.png
  72. BIN
      PDF Office/Resources/PageEdit/HorizontalLine.png
  73. BIN
      PDF Office/Resources/PageEdit/Staff.png
  74. BIN
      PDF Office/Resources/PropertyPanel/colorIcon.png
  75. BIN
      PDF Office/Resources/PropertyPanel/propertybar_empty.png
  76. 1 2
      PDF Office/SDKLisence.xml
  77. 239 0
      PDF Office/Styles/ButtonStyle.xaml
  78. 151 14
      PDF Office/Styles/CheckBoxStyle.xaml
  79. 77 0
      PDF Office/Styles/ContainerStyles/ComboxStyle/ComboxItemStyle.xaml
  80. 276 112
      PDF Office/Styles/CustomBtnStyle.xaml
  81. 8 4
      PDF Office/Styles/ListBoxStyle.xaml
  82. 80 28
      PDF Office/Styles/ListViewStyle.xaml
  83. 262 0
      PDF Office/Styles/RadioButtonStyle.xaml
  84. 652 0
      PDF Office/Styles/SliderStyle.xaml
  85. 16 0
      PDF Office/Styles/TextBoxStyle.xaml
  86. 0 28
      PDF Office/Styles/ToolsBtnStyle.xaml
  87. 0 22
      PDF Office/Styles/ToolsMenuStyle.xaml
  88. 243 0
      PDF Office/Themes/Alias_Light.xaml
  89. 348 0
      PDF Office/Themes/Global.xaml
  90. 0 268
      PDF Office/UpgradeLog.htm
  91. 0 268
      PDF Office/UpgradeLog2.htm
  92. 0 268
      PDF Office/UpgradeLog3.htm
  93. 25 18
      PDF Office/ViewModels/BOTA/BOTAContentViewModel.cs
  94. 371 0
      PDF Office/ViewModels/BOTA/BookmarkContentViewModel.cs
  95. 141 71
      PDF Office/ViewModels/BottomToolContentViewModel.cs
  96. 81 0
      PDF Office/ViewModels/Dialog/BOTA/AddBookmarkDialogViewModel.cs
  97. 72 0
      PDF Office/ViewModels/Dialog/BOTA/BookmarkInfoDialogViewModel.cs
  98. 152 3
      PDF Office/ViewModels/Dialog/PageEditDialogs/InsertDialogViewModel.cs
  99. 64 2
      PDF Office/ViewModels/Dialog/PageEditDialogs/SplitDialogViewModel.cs
  100. 0 0
      PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs

+ 4 - 0
PDF Office/App.xaml

@@ -7,10 +7,14 @@
     <Application.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Themes/Alias_Light.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Themes/Global.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/TabControlStyle.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ComboxStyle.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ListBoxStyle.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/WindowsStyle.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/CustomBtnStyle.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ContainerStyles/ComboxStyle/ComboxItemStyle.xaml" />
                 <!--  Enable show customctrol's correctly UI in Xaml Designer  -->
                 <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Themes/Generic.xaml" />
             </ResourceDictionary.MergedDictionaries>

+ 75 - 29
PDF Office/App.xaml.cs

@@ -23,17 +23,24 @@ using PDF_Office.Model;
 using PDF_Office.Views.PageEdit;
 using PDF_Office.Properties;
 using PDFSettings.Settings;
-using PDF_Office.Views.Tools; 
+using PDF_Office.Views.Tools;
 using PDF_Office.Views.Dialog.ToolsDialogs.SaftyDialogs;
 using PDF_Office.Views.Dialog.ToolsDialogs.CompressDialogs;
 using PDF_Office.Views.Dialog.PageEditDialogs;
-using PDF_Office.Views.Dialog.HomePageToolsDialogs ;
+using PDF_Office.Helper;
+using PDF_Office.Views.Dialog.HomePageToolsDialogs;
 using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter;
+using PDF_Office.Views.PropertyPanel;
+using PDF_Office.Views.Dialog.BOTA;
+using PDF_Office.Views.PropertyPanel.AnnotPanel;
+using PDF_Office.Views.FillAndSign;
+using PDF_Office.Views.FillAndSign.PropertyPanel;
+using PDF_Office.Views.PropertyPanel.ViewModular;
 using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
 using PDF_Office.Views.Dialog.ConverterDialogs;
 using PDF_Office.Helper;
 using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
-using PDF_Office.Views.EditTools.Watermark; 
+using PDF_Office.Views.EditTools.Watermark; 
 using PDF_Office.Views.EditTools.Background;
 
 namespace PDF_Office
@@ -50,22 +57,20 @@ namespace PDF_Office
         public static List<string> OpenedFileList = new List<string>();
 
         public static bool IsFirstOpen = true;
+        public static bool IsBookMode = false;
 
         public App()
         {
-
 #if !DEBUG
-            //接入Appcenter后台数据检测
-            string appkey = "b099dccc-1ca5-4ea1-a2fa-afd4a6e1f8bb"
-            AppCenter.Start(appkey, typeof(Analytics), typeof(Crashes));
-            var countryCode = RegionInfo.CurrentRegion.TwoLetterISORegionName;//上传国家信息
-            AppCenter.SetCountryCode(countryCode);
+        //接入Appcenter后台数据检测
+        string appkey = "b099dccc-1ca5-4ea1-a2fa-afd4a6e1f8bb"
+        AppCenter.Start(appkey, typeof(Analytics), typeof(Crashes));
+        var countryCode = RegionInfo.CurrentRegion.TwoLetterISORegionName;//上传国家信息
+        AppCenter.SetCountryCode(countryCode);
 #endif
             LicenseVerify();
 
-
-            if (Settings.Default.RecentOpenFiles == null)
-                Settings.Default.RecentOpenFiles = new RecentOpenFiles();
+            InitSettings();
 
             try
             {
@@ -79,24 +84,38 @@ namespace PDF_Office
             }
             catch (Exception ex)
             {
-
             }
         }
 
+        private void InitSettings()
+        {
+            if (Settings.Default.RecentOpenFiles == null)
+                Settings.Default.RecentOpenFiles = new RecentOpenFiles();
+
+            if (Settings.Default.AppProperties == null)
+                Settings.Default.AppProperties = new PDFSettings.APPSettingProperties();
+
+            if (Settings.Default.AllPDFToolsList == null)
+                Settings.Default.AllPDFToolsList = new PDFSettings.AllPDFToolsList();
+
+            if (Settings.Default.QuickPDFToolsList == null)
+                Settings.Default.QuickPDFToolsList = new PDFSettings.QuickPDFToolsList();
+
+        }
+
         /// <summary>
         /// 创建启动窗口
         /// </summary>
         /// <returns></returns>
         protected override Window CreateShell()
         {
- 
             return Container.Resolve<MainWindow>();
         }
 
-
         protected override void RegisterTypes(IContainerRegistry containerRegistry)
         {
-            //注册内容组件
+            #region 注册内容组件
+
             containerRegistry.RegisterForNavigation<HomeContent>();
             containerRegistry.RegisterForNavigation<ViewContent>();
             containerRegistry.RegisterForNavigation<MainContent>();
@@ -104,8 +123,17 @@ namespace PDF_Office
             containerRegistry.RegisterForNavigation<HomeToolsContent>("Tools");
             containerRegistry.RegisterForNavigation<HomeGuidContent>("Guid");
             containerRegistry.RegisterForNavigation<BOTAContent>();
+            containerRegistry.RegisterForNavigation<PropertyPanelContent>();
             containerRegistry.RegisterForNavigation<PageEditContent>();
+            containerRegistry.RegisterForNavigation<BottomToolContent>();
             containerRegistry.RegisterForNavigation<ToolsBarContent>();
+            containerRegistry.RegisterForNavigation<AnnotToolContent>();
+            containerRegistry.RegisterForNavigation<BookmarkContent>();
+            containerRegistry.RegisterForNavigation<ViewModularContent>();
+            containerRegistry.RegisterForNavigation<SplitScreenContent>();
+            containerRegistry.RegisterForNavigation<ThemesContent>();
+            containerRegistry.RegisterForNavigation<ReadModeContent>();
+
             containerRegistry.RegisterForNavigation<HomePagePrinterModSizeContent>();
             containerRegistry.RegisterForNavigation<HomePagePrinterModPosterContent>();
             containerRegistry.RegisterForNavigation<HomePagePrinterModMultipleContent>();
@@ -134,8 +162,25 @@ namespace PDF_Office
             containerRegistry.RegisterForNavigation<WatermarkCreateTextContent>();
             containerRegistry.RegisterForNavigation<WatermarkCreateFileContent>();
             containerRegistry.RegisterForNavigation<WatermarkDocumentContent>();
+            containerRegistry.RegisterForNavigation<HomePagePrinterModMultipleContent>();
+            containerRegistry.RegisterForNavigation<FreehandAnnotProperty>();
+            containerRegistry.RegisterForNavigation<FreetextAnnotProperty>();
+            containerRegistry.RegisterForNavigation<ImageAnnotProperty>();
+            containerRegistry.RegisterForNavigation<LinkAnnotProperty>();
+            containerRegistry.RegisterForNavigation<SharpsAnnotProperty>();
+            containerRegistry.RegisterForNavigation<StampAnnotProperty>();
+            containerRegistry.RegisterForNavigation<TextAnnotProperty>();
+            containerRegistry.RegisterForNavigation<TextEditProperty>();
+            //填写与签名
+            containerRegistry.RegisterForNavigation<FillAndSignContent>();
+            containerRegistry.RegisterForNavigation<DateFillProperty>();
+            containerRegistry.RegisterForNavigation<ShapFillProperty>();
+            containerRegistry.RegisterForNavigation<TextFillProperty>();
+
+            #endregion 注册内容组件
+
+            #region 注册弹窗
 
-            //注册弹窗
             containerRegistry.RegisterDialog<VerifyPassWordDialog>(DialogNames.VerifyPassWordDialog);
             containerRegistry.RegisterDialog<FullScreenWindow>(DialogNames.FullScreenDialog);
             containerRegistry.RegisterDialog<CompressDialog>(DialogNames.CompressDialog);
@@ -164,6 +209,7 @@ namespace PDF_Office
             containerRegistry.RegisterDialog<ConverterProgressBarDialog>(DialogNames.ConverterProgressBarDialog);
 
 
+            #endregion 注册弹窗
         }
 
         protected override void ConfigureRegionAdapterMappings(RegionAdapterMappings regionAdapterMappings)
@@ -190,7 +236,7 @@ namespace PDF_Office
                 if (!result)
                     return false;
             }
-            catch{ }
+            catch { }
             SDKLisenceHelper sdkhelper = new SDKLisenceHelper();
             string devKey = "";
             string devSecret = "";
@@ -200,8 +246,8 @@ namespace PDF_Office
             devKey = sdkhelper.DevKey;
             devSecret = sdkhelper.DevSecret;
 #endif
-            string userKey = sdkhelper.UserKey; 
-            string userSecret = sdkhelper.UserSecret; 
+            string userKey = sdkhelper.UserKey;
+            string userSecret = sdkhelper.UserSecret;
 
             try
             {
@@ -209,21 +255,21 @@ namespace PDF_Office
                 if (verifyResult != CPDFSDKVerifier.LicenseErrorCode.LICENSE_ERR_SUCCESS)
                     return false;
             }
-            catch{ }
+            catch { }
 
             string ConverterDevKey = sdkhelper.ConverterDevKey;
-            string ConverterDevSecret = sdkhelper.ConverterDevSecret; 
-            string ConverterUserkey = sdkhelper.ConverterUserkey; 
+            string ConverterDevSecret = sdkhelper.ConverterDevSecret;
+            string ConverterUserkey = sdkhelper.ConverterUserkey;
             string ConverterUserSecret = sdkhelper.ConverterUserSecret;
 
             try
             {
                 /*LicenseError licenseerror = CPDFConverter.SDKLicenseVerify(ConverterDevKey, ConverterDevSecret, ConverterUserkey, ConverterUserSecret);
-            string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
-            if (licenseerror != LicenseError.ERR_SUCCESS)
-            {
+                string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
+                if (licenseerror != LicenseError.ERR_SUCCESS)
+                {
                 return false;
-            }
+                }
                 CPDFConverter.Init(resPath);*/
                 string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
                 LicenseError licenseerror = CPDFConverter.LicenseVerify(ConverterDevKey, ConverterDevSecret);
@@ -234,7 +280,7 @@ namespace PDF_Office
                 }
                 CPDFConverter.Init(resPath);
             }
-            catch{ }
+            catch { }
             return result;
         }
 
@@ -244,4 +290,4 @@ namespace PDF_Office
             base.OnExit(e);
         }
     }
-}
+}

+ 33 - 0
PDF Office/CustomControl/ColorDropBox.xaml

@@ -0,0 +1,33 @@
+<UserControl
+    x:Class="PDF_Office.CustomControl.ColorDropBox"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Office.CustomControl"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    MinWidth="0"
+    d:DesignHeight="450"
+    d:DesignWidth="800"
+    Background="#01000000"
+    mc:Ignorable="d">
+    <Grid>
+        <Ellipse
+            Width="20"
+            Height="20"
+            HorizontalAlignment="Center"
+            VerticalAlignment="Center">
+            <Ellipse.Fill>
+                <DrawingBrush>
+                    <DrawingBrush.Drawing>
+                        <ImageDrawing ImageSource="../Resources/PropertyPanel/colorIcon.png">
+                            <ImageDrawing.Rect>
+                                <Rect Width="16" Height="16" />
+                            </ImageDrawing.Rect>
+                        </ImageDrawing>
+                    </DrawingBrush.Drawing>
+                </DrawingBrush>
+            </Ellipse.Fill>
+        </Ellipse>
+    </Grid>
+
+</UserControl>

+ 330 - 0
PDF Office/CustomControl/ColorDropBox.xaml.cs

@@ -0,0 +1,330 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.CustomControl
+{
+    /// <summary>
+    /// ColorDropBox.xaml 的交互逻辑
+    /// </summary>
+    public partial class ColorDropBox : UserControl, INotifyPropertyChanged
+    {
+        public class AdornerPresenter : Adorner
+        {
+            private VisualCollection VisualChildren;
+            private ContentPresenter Content;
+            public AdornerPresenter(UIElement adornedElement) : base(adornedElement)
+            {
+                VisualChildren = new VisualCollection(this);
+                Content = new ContentPresenter();
+                VisualChildren.Add(Content);
+            }
+
+            protected override Size MeasureOverride(Size constraint)
+            {
+                Content.Measure(constraint);
+                return Content.DesiredSize;
+            }
+
+            protected override Size ArrangeOverride(Size finalSize)
+            {
+                Content.Arrange(new Rect(0, 0, finalSize.Width, finalSize.Height));
+                return Content.RenderSize;
+            }
+
+            protected override Visual GetVisualChild(int index)
+            {
+                return VisualChildren[index];
+            }
+
+            protected override int VisualChildrenCount
+            {
+                get
+                {
+                    return VisualChildren.Count;
+                }
+            }
+
+            public object VisualContent
+            {
+                get
+                {
+                    return Content.Content;
+                }
+                set
+                {
+                    Content.Content = value;
+                }
+            }
+        }
+
+        private AdornerLayer popLayer;
+        private AdornerPresenter layerPresent;
+        private bool layerAdded = false;
+        private Canvas popCanvas;
+        private ColorDropBoxPop colorPop;
+
+        public event EventHandler<Color?> SelectedColorChanged;
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected void OnPropertyChanged([CallerMemberName] string name = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
+        }
+        private Color? _selectedColor;
+        public Color? SelectedColor
+        {
+            get
+            {
+                return _selectedColor;
+            }
+            set
+            {
+                if (_selectedColor != value)
+                {
+                    _selectedColor = value;
+                    OnPropertyChanged("SelectedColor");
+                }
+            }
+        }
+        public bool HasTransparentColor
+        {
+            get
+            {
+                if (colorPop != null)
+                {
+                    return colorPop.TransparentPanel.Visibility == Visibility.Visible;
+                }
+                return false;
+            }
+            set
+            {
+                if (colorPop != null)
+                {
+                    colorPop.SetTransparentPanelVisible(value);
+                }
+            }
+        }
+        public ColorDropBox()
+        {
+            InitializeComponent();
+            Loaded += ColorDropBox_Loaded;
+            Unloaded += ColorDropBox_Unloaded;
+            MouseDown += ColorDropBox_MouseDown;
+            colorPop = new ColorDropBoxPop();
+        }
+
+        private void ColorDropBox_Unloaded(object sender, RoutedEventArgs e)
+        {
+            if (layerAdded)
+            {
+                RemoveFromLayer();
+                return;
+            }
+        }
+
+        private void ColorDropBox_MouseDown(object sender, MouseButtonEventArgs e)
+        {
+            e.Handled = true;
+            ShowLayer();
+        }
+
+        public void ShowLayer(DependencyObject dependencyObject = null)
+        {
+            if (layerAdded)
+            {
+                RemoveFromLayer();
+                return;
+            }
+            AddToLayer(dependencyObject);
+        }
+
+        private void AddToLayer(DependencyObject dependencyObject = null)
+        {
+            Window parentWnd = Window.GetWindow(this);
+
+            popLayer = AdornerLayer.GetAdornerLayer(parentWnd.Content as UIElement);
+            if (popLayer != null && colorPop != null &&!layerAdded)
+            {
+                if (layerPresent == null)
+                {
+                    layerPresent = new AdornerPresenter(popLayer);
+                }
+                popLayer.Add(layerPresent);
+                if (popCanvas == null)
+                {
+                    popCanvas = new Canvas();
+                    popCanvas.Children.Add(colorPop);
+                    layerPresent.VisualContent = popCanvas;
+
+                    colorPop.ColorSelected += ColorPop_ColorSelected;
+                }
+                Point offset = GetOffsetToWindow(dependencyObject);
+                colorPop.Visibility = Visibility.Visible;
+                colorPop.Measure(new Size(parentWnd.ActualWidth, parentWnd.ActualHeight));
+                colorPop.SetValue(Canvas.TopProperty, offset.Y + this.ActualHeight + 2);
+
+                if (offset.X + colorPop.DesiredSize.Width + SystemParameters.ResizeFrameVerticalBorderWidth * 2 > parentWnd.ActualWidth)
+                {
+                    colorPop.SetValue(Canvas.LeftProperty, parentWnd.ActualWidth - colorPop.DesiredSize.Width - 5 - SystemParameters.ResizeFrameVerticalBorderWidth * 2);
+                }
+                else
+                {
+                    colorPop.SetValue(Canvas.LeftProperty, offset.X);
+                }
+                layerAdded = true;
+            }
+        }
+        private void RemoveFromLayer()
+        {
+            if (popLayer != null && layerPresent != null && layerAdded)
+            {
+                popLayer.Remove(layerPresent);
+                layerAdded = false;
+            }
+        }
+
+        private void ColorDropBox_Loaded(object sender, RoutedEventArgs e)
+        {
+            if (popLayer == null)
+            {
+                Window parentWnd = Window.GetWindow(this);
+                if (parentWnd != null && parentWnd.Content is UIElement && colorPop != null)
+                {
+                    parentWnd.AddHandler(MouseDownEvent, new MouseButtonEventHandler((eventsender, param) =>
+                    {
+                        if (layerAdded)
+                        {
+                            try
+                            {
+                                Window checkWindow = Window.GetWindow(this);
+                                Point clickPoint = param.GetPosition(checkWindow);
+                                Point leftTop = TransformToVisual(checkWindow).Transform(new Point(0, 0));
+                                Point rightBottom = TransformToVisual(checkWindow).Transform(new Point(ActualWidth, ActualHeight));
+                                Point popLeftTop = new Point(Canvas.GetLeft(colorPop), Canvas.GetTop(colorPop));
+                                Point popRightBottom = new Point(colorPop.ActualWidth, colorPop.ActualHeight);
+                                Rect dropboxRect = new Rect(leftTop.X, leftTop.Y, rightBottom.X - leftTop.X, rightBottom.Y - leftTop.Y);
+                                Rect popboxRect = new Rect(popLeftTop.X, popLeftTop.Y, popRightBottom.X, popRightBottom.Y);
+                                if (dropboxRect.Contains(clickPoint) || popboxRect.Contains(clickPoint))
+                                {
+                                    return;
+                                }
+                                RemoveFromLayer();
+                            }
+                            catch(Exception ex)
+                            {
+
+                            }
+                           
+                        }
+                    }), true);
+                }
+            }
+        }
+
+        private void ColorPop_ColorSelected(object sender, Color e)
+        {
+            if (SelectedColor != e)
+            {
+              //  NormalColorRectControl.Visibility = Visibility.Collapsed;
+               // TransparentRectControl.Visibility = Visibility.Collapsed;
+                if (e != Colors.Transparent)
+                {
+                  //  NormalColorRectControl.Visibility = Visibility.Visible;
+                  //  NormalColorRectControl.Fill = new SolidColorBrush(e);
+                }
+                else
+                {
+                 //   TransparentRectControl.Visibility = Visibility.Visible;
+                }
+                SelectedColor = e;
+                SelectedColorChanged?.Invoke(this, SelectedColor);
+            }
+            RemoveFromLayer();
+        }
+
+        public Point GetOffsetToWindow(DependencyObject dependencyObject = null)
+        {
+            Window parentWnd = Window.GetWindow(this);
+            if (dependencyObject != null)
+            {
+                var frame = dependencyObject as FrameworkElement;
+                if(frame != null)
+                {
+                    return frame.TransformToAncestor(parentWnd).Transform(new Point(0, 0));
+                }
+            }
+           
+            return TransformToAncestor(parentWnd).Transform(new Point(0, 0));
+        }
+
+        public void SetThemeColors(List<Color> themeColorList)
+        {
+            if (colorPop != null)
+            {
+                colorPop.ThemeColors.Clear();
+                foreach (Color themeColor in themeColorList)
+                {
+                    colorPop.ThemeColors.Add(themeColor);
+                }
+            }
+        }
+        public List<Color> GetThemeColors()
+        {
+            if (colorPop != null)
+            {
+                return colorPop.ThemeColors.ToList();
+            }
+            return new List<Color>();
+        }
+        public List<Color> GetRecentlyColors()
+        {
+            if (colorPop != null)
+            {
+                return colorPop.RecentlyColors.ToList();
+            }
+            return new List<Color>();
+        }
+        public void SetSelectedColor(Color setColor)
+        {
+            if (SelectedColor != setColor)
+            {
+              //  NormalColorRectControl.Visibility = Visibility.Collapsed;
+              //  TransparentRectControl.Visibility = Visibility.Collapsed;
+                if (setColor != Colors.Transparent)
+                {
+               //     NormalColorRectControl.Visibility = Visibility.Visible;
+               //     NormalColorRectControl.Fill = new SolidColorBrush(setColor);
+                }
+                else
+                {
+               //     TransparentRectControl.Visibility = Visibility.Visible;
+                }
+                SelectedColor = setColor;
+                if (colorPop != null)
+                {
+                    colorPop.AddColorToRecent(setColor);
+                }
+            }
+        }
+
+        public void ClearSelectColor()
+        {
+            _selectedColor = null;
+           // NormalColorRectControl.Visibility = Visibility.Collapsed;
+           // TransparentRectControl.Visibility = Visibility.Collapsed;
+        }
+    }
+}

+ 114 - 0
PDF Office/CustomControl/ColorDropBoxPop.xaml

@@ -0,0 +1,114 @@
+<UserControl x:Class="PDF_Office.CustomControl.ColorDropBoxPop"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:PDF_Office.CustomControl"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800" Width="194" Height="auto">
+    <UserControl.Resources>
+        <local:ColorToBrushConverter x:Key="ColorToBrushConverter"></local:ColorToBrushConverter>
+        <Style TargetType="ListViewItem">
+            <Setter Property="Width" Value="15" ></Setter>
+            <Setter Property="Height" Value="15" ></Setter>
+            <Setter Property="Padding" Value="0"></Setter>
+            <Setter Property="BorderThickness" Value="1"></Setter>
+            <Setter Property="BorderBrush" Value="#33000000"></Setter>
+            <Setter Property="Margin" Value="1"></Setter>
+        </Style>
+    </UserControl.Resources>
+    <Grid>
+        <Border Background="White" Name="ContainerBorder" BorderThickness="1">
+            <Border.Effect>
+                <DropShadowEffect Color="#000000" ShadowDepth="0" BlurRadius="24" Opacity="0.22">
+                </DropShadowEffect>
+            </Border.Effect>
+            <Grid>
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="auto"></RowDefinition>
+                    <RowDefinition Height="auto"></RowDefinition>
+                    <RowDefinition Height="auto"></RowDefinition>
+                    <RowDefinition Height="auto"></RowDefinition>
+                    <RowDefinition Height="auto"></RowDefinition>
+                    <RowDefinition Height="auto"></RowDefinition>
+                    <RowDefinition Height="auto"></RowDefinition>
+                    <RowDefinition Height="auto"></RowDefinition>
+                </Grid.RowDefinitions>
+                <TextBlock x:Name="RecentlyColorText" VerticalAlignment="Bottom" LineHeight="20" FontFamily="Segoe UI" FontSize="14" Margin="8,8,0,3">Recently used color</TextBlock>
+                <ListView Grid.Row="1" BorderThickness="0" Name="RecentlyColorList" Margin="9,0,9,0" ScrollViewer.HorizontalScrollBarVisibility="Hidden">
+                    <ListView.ItemsPanel>
+                        <ItemsPanelTemplate>
+                            <WrapPanel Width="{Binding ElementName=ThemeColorList,Path=ActualWidth}">
+                            </WrapPanel>
+                        </ItemsPanelTemplate>
+                    </ListView.ItemsPanel>
+                    <ListView.ItemTemplate>
+                        <DataTemplate>
+                            <Rectangle Width="14" Height="14" Fill="{Binding Converter={StaticResource ColorToBrushConverter}}" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown"></Rectangle>
+                        </DataTemplate>
+                    </ListView.ItemTemplate>
+                </ListView>
+                <TextBlock x:Name="ThemeColorsText" Grid.Row="2" FontFamily="SegoeUI" FontSize="14" LineHeight="20" Margin="8,5,0,1">Theme colors</TextBlock>
+                <ListView Grid.Row="3" BorderThickness="0" Name="ThemeColorList"  Margin="9,0,9,0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" SelectionMode="Single">
+                    <ListView.ItemsPanel>
+                        <ItemsPanelTemplate>
+                            <WrapPanel Width="{Binding ElementName=ThemeColorList,Path=ActualWidth}">
+                            </WrapPanel>
+                        </ItemsPanelTemplate>
+                    </ListView.ItemsPanel>
+                    <ListView.ItemTemplate>
+                        <DataTemplate>
+                            <Rectangle Width="14" Height="14" Fill="{Binding Converter={StaticResource ColorToBrushConverter}}" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown"></Rectangle>
+                        </DataTemplate>
+                    </ListView.ItemTemplate>
+                </ListView>
+                <Separator Grid.Row="4" Width="190" Height="1"  Background="#26000000" HorizontalAlignment="Center" Margin="2,9,2,8"></Separator>
+                <StackPanel Orientation="Horizontal" Grid.Row="5" Name="TransparentPanel" Margin="0 0 0 8" Visibility="Collapsed">
+                    <Rectangle Width="16" Height="16" Margin="8,0,2,0" MouseLeftButtonDown="TransparentColor_MouseLeftButtonDown">
+                        <Rectangle.Fill>
+                            <DrawingBrush>
+                                <DrawingBrush.Drawing>
+                                    <DrawingGroup>
+                                        <GeometryDrawing Brush="White">
+                                            <GeometryDrawing.Pen>
+                                                <Pen Thickness="1" Brush="#E2E3E6"></Pen>
+                                            </GeometryDrawing.Pen>
+                                            <GeometryDrawing.Geometry>
+                                                <RectangleGeometry Rect="0,0,16,16"></RectangleGeometry>
+                                            </GeometryDrawing.Geometry>
+                                        </GeometryDrawing>
+                                        <GeometryDrawing>
+                                            <GeometryDrawing.Pen>
+                                                <Pen Thickness="2" Brush="#FF3B30"></Pen>
+                                            </GeometryDrawing.Pen>
+                                            <GeometryDrawing.Geometry>
+                                                <LineGeometry StartPoint="16,0" EndPoint="0,16"></LineGeometry>
+                                            </GeometryDrawing.Geometry>
+                                        </GeometryDrawing>
+                                    </DrawingGroup>
+                                </DrawingBrush.Drawing>
+                            </DrawingBrush>
+                        </Rectangle.Fill>
+                    </Rectangle>
+                    <TextBlock x:Name="TransparentText" FontFamily="Segoe UI" FontSize="14" VerticalAlignment="Center">Transparent</TextBlock>
+                </StackPanel>
+                <StackPanel Orientation="Horizontal" Grid.Row="6" MouseDown="SystemColorPicker_ClickPop">
+                    <Ellipse Width="16" Height="16" Margin="8,0,2,10"  VerticalAlignment="Center">
+                        <Ellipse.Fill>
+                            <DrawingBrush>
+                                <DrawingBrush.Drawing>
+                                    <ImageDrawing ImageSource="../Resources/PropertyPanel/colorIcon.png">
+                                        <ImageDrawing.Rect>
+                                            <Rect Width="16" Height="16"></Rect>
+                                        </ImageDrawing.Rect>
+                                    </ImageDrawing>
+                                </DrawingBrush.Drawing>
+                            </DrawingBrush>
+                        </Ellipse.Fill>
+                    </Ellipse>
+                    <TextBlock x:Name="OtherColorsText" VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="14" Margin="0 0 0 8">Other Colors</TextBlock>
+                </StackPanel>
+            </Grid>
+        </Border>
+    </Grid>
+</UserControl>

+ 200 - 0
PDF Office/CustomControl/ColorDropBoxPop.xaml.cs

@@ -0,0 +1,200 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using WinForm = System.Windows.Forms;
+
+namespace PDF_Office.CustomControl
+{
+    /// <summary>
+    /// ColorDropBoxPop.xaml 的交互逻辑
+    /// </summary>
+    public class ColorToBrushConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is Color)
+            {
+                return new SolidColorBrush((Color)value);
+            }
+            return Brushes.Transparent;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+    /// <summary>
+    /// ColorDropBoxPop.xaml 的交互逻辑
+    /// </summary>
+    public partial class ColorDropBoxPop : UserControl
+    {
+        public event EventHandler<Color> ColorSelected;
+        public ObservableCollection<Color> RecentlyColors { get; private set; }
+        public ObservableCollection<Color> ThemeColors { get; private set; }
+        public ColorDropBoxPop()
+        {
+            InitializeComponent();
+            SetLangText();
+            RecentlyColors = new ObservableCollection<Color>();
+            ThemeColors = new ObservableCollection<Color>();
+            CreateThemeColors();
+            RecentlyColorList.ItemsSource = RecentlyColors;
+            ThemeColorList.ItemsSource = ThemeColors;
+        }
+
+        private void SetLangText()
+        {
+            //RecentlyColorText.Text = App.MainPageLoader.GetString("Themes_RecentlyUsed");
+            //TransparentText.Text = App.MainPageLoader.GetString("Themes_Transparent");
+            //OtherColorsText.Text = App.MainPageLoader.GetString("Themes_More");
+            //ThemeColorsText.Text = App.MainPageLoader.GetString("ProperPanel_Color");
+        }
+
+        public void CreateThemeColors()
+        {
+            ThemeColors.Add(Color.FromRgb(0xFF, 0xFF, 0xFF));
+            ThemeColors.Add(Color.FromRgb(0x00, 0x00, 0x00));
+            ThemeColors.Add(Color.FromRgb(0x25, 0x1C, 0x16));
+            ThemeColors.Add(Color.FromRgb(0xCC, 0x00, 0x00));
+            ThemeColors.Add(Color.FromRgb(0xCC, 0x4E, 0x00));
+            ThemeColors.Add(Color.FromRgb(0x99, 0x70, 0x00));
+            ThemeColors.Add(Color.FromRgb(0x1C, 0x70, 0x17));
+            ThemeColors.Add(Color.FromRgb(0x00, 0x8D, 0x99));
+            ThemeColors.Add(Color.FromRgb(0x00, 0x3F, 0x99));
+            ThemeColors.Add(Color.FromRgb(0x61, 0x00, 0x99));
+
+            ThemeColors.Add(Color.FromRgb(0x88, 0x88, 0x88));
+            ThemeColors.Add(Color.FromRgb(0x1B, 0x1B, 0x1B));
+            ThemeColors.Add(Color.FromRgb(0x4A, 0x37, 0x2C));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0x00, 0x00));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0x61, 0x00));
+            ThemeColors.Add(Color.FromRgb(0xCC, 0x96, 0x00));
+            ThemeColors.Add(Color.FromRgb(0x27, 0x9D, 0x20));
+            ThemeColors.Add(Color.FromRgb(0x00, 0xBC, 0xCC));
+            ThemeColors.Add(Color.FromRgb(0x00, 0x54, 0xcc));
+            ThemeColors.Add(Color.FromRgb(0x82, 0x00, 0xcc));
+
+            ThemeColors.Add(Color.FromRgb(0xA0, 0xA0, 0xA0));
+            ThemeColors.Add(Color.FromRgb(0x29, 0x29, 0x29));
+            ThemeColors.Add(Color.FromRgb(0x6E, 0x53, 0x42));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0x33, 0x33));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0x81, 0x33));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0xBB, 0x00));
+            ThemeColors.Add(Color.FromRgb(0x32, 0xCA, 0x29));
+            ThemeColors.Add(Color.FromRgb(0x00, 0xEB, 0xFF));
+            ThemeColors.Add(Color.FromRgb(0x00, 0x69, 0xFF));
+            ThemeColors.Add(Color.FromRgb(0xA2, 0x00, 0xFF));
+
+            ThemeColors.Add(Color.FromRgb(0xB8, 0xB8, 0xB8));
+            ThemeColors.Add(Color.FromRgb(0x44, 0x44, 0x44));
+            ThemeColors.Add(Color.FromRgb(0x93, 0x6E, 0x58));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0x66, 0x66));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0xA0, 0x66));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0xC9, 0x33));
+            ThemeColors.Add(Color.FromRgb(0x38, 0xE0, 0x2E));
+            ThemeColors.Add(Color.FromRgb(0x33, 0xEF, 0xFF));
+            ThemeColors.Add(Color.FromRgb(0x33, 0x87, 0xFF));
+            ThemeColors.Add(Color.FromRgb(0xB5, 0x33, 0xFF));
+
+            ThemeColors.Add(Color.FromRgb(0xCF, 0xCF, 0xCF));
+            ThemeColors.Add(Color.FromRgb(0x5F, 0x5F, 0x5F));
+            ThemeColors.Add(Color.FromRgb(0xB8, 0x8A, 0x6E));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0x99, 0x99));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0xB0, 0x80));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0xD6, 0x66));
+            ThemeColors.Add(Color.FromRgb(0x60, 0xE6, 0x58));
+            ThemeColors.Add(Color.FromRgb(0x66, 0xF3, 0xFF));
+            ThemeColors.Add(Color.FromRgb(0x66, 0xA5, 0xFF));
+            ThemeColors.Add(Color.FromRgb(0xC7, 0x66, 0xFF));
+
+            ThemeColors.Add(Color.FromRgb(0xE7, 0xE7, 0xE7));
+            ThemeColors.Add(Color.FromRgb(0x7A, 0x7A, 0x7A));
+            ThemeColors.Add(Color.FromRgb(0xC6, 0xA1, 0x8B));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0xCC, 0xCC));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0xC4, 0x9F));
+            ThemeColors.Add(Color.FromRgb(0xFF, 0xE4, 0x99));
+            ThemeColors.Add(Color.FromRgb(0x88, 0xEC, 0x82));
+            ThemeColors.Add(Color.FromRgb(0x99, 0xF7, 0xFF));
+            ThemeColors.Add(Color.FromRgb(0x99, 0xC3, 0xFF));
+            ThemeColors.Add(Color.FromRgb(0xDA, 0x99, 0xFF));
+        }
+
+        private void SystemColorPicker_ClickPop(object sender, MouseButtonEventArgs e)
+        {
+            this.Visibility = Visibility.Collapsed;
+            WinForm.ColorDialog colorPicker = new WinForm.ColorDialog();
+            WinForm.DialogResult result = colorPicker.ShowDialog();
+            if (result == WinForm.DialogResult.OK)
+            {
+
+                Color selectColor = Color.FromArgb(colorPicker.Color.A, colorPicker.Color.R, colorPicker.Color.G, colorPicker.Color.B);
+                AddColorToRecent(selectColor);
+                if (ColorSelected != null)
+                {
+                    ColorSelected?.Invoke(this, selectColor);
+                }
+            }
+        }
+
+        private void TransparentColor_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            if (ColorSelected != null)
+            {
+                ColorSelected?.Invoke(this, Colors.Transparent);
+            }
+            this.Visibility = Visibility.Collapsed;
+        }
+
+        private void Rectangle_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            this.Visibility = Visibility.Collapsed;
+            Rectangle clickRectangle = sender as Rectangle;
+            if (clickRectangle != null)
+            {
+                SolidColorBrush fillBrush = clickRectangle.Fill as SolidColorBrush;
+                if (fillBrush != null)
+                {
+                    AddColorToRecent(fillBrush.Color);
+                    if (ColorSelected != null)
+                    {
+                        ColorSelected?.Invoke(this, fillBrush.Color);
+                    }
+                }
+            }
+        }
+
+        public void AddColorToRecent(Color recentColor)
+        {
+            if(recentColor==Colors.Transparent)
+            {
+                return;
+            }
+            if (RecentlyColors.AsEnumerable().Where(x => x == recentColor).Count() == 0)
+            {
+                while (RecentlyColors.Count >= 10)
+                {
+                    RecentlyColors.RemoveAt(0);
+                }
+                RecentlyColors.Add(recentColor);
+            }
+        }
+        public void SetTransparentPanelVisible(bool visible)
+        {
+            TransparentPanel.Visibility = visible ? Visibility.Visible : Visibility.Collapsed;
+        }
+    }
+}

+ 69 - 0
PDF Office/CustomControl/CompositeControl/ColorContent.xaml

@@ -0,0 +1,69 @@
+<UserControl x:Class="PDF_Office.CustomControl.CompositeControl.ColorContent"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml"/>
+            </ResourceDictionary.MergedDictionaries>
+            <DataTemplate x:Key="listboxData">
+                <Ellipse Height="20" Width="20" Fill="{Binding Color}"/>
+            </DataTemplate>
+            
+            <ContextMenu x:Key="FlyoutMenu" FontSize="14">
+                <ContextMenu.ItemContainerStyle>
+                    <Style TargetType="MenuItem">
+                        <Setter Property="Padding" Value="0,7,0,7"/>
+                        <Setter Property="VerticalContentAlignment" Value="Center"/>
+                    </Style>
+                </ContextMenu.ItemContainerStyle>
+                <MenuItem Name="ChangeColorMenuItem" Click="ChangeColorMenuItem_Click" Header="更改颜色" IsEnabled="True">
+                </MenuItem>
+                <MenuItem Name="BackColorMenuItem" Click="BackColorMenuItem_Click"  Header="恢复默认颜色"  IsEnabled="True">
+                </MenuItem>
+            </ContextMenu>
+
+            <Style x:Key="listboxItemStyle" TargetType="{x:Type ListBoxItem}">
+                <Setter Property="ContextMenu" Value="{StaticResource FlyoutMenu}"/>
+                <Setter Property="HorizontalContentAlignment" Value="Center"/>
+                <Setter Property="Height" Value="32"/>
+                <Setter Property="Margin" Value="2,0,2,0"/>
+                <EventSetter Event="PreviewMouseRightButtonDown"
+                             Handler="listboxItem_PreviewMouseRightButtonDown"/>
+            </Style>
+        </ResourceDictionary>
+    </UserControl.Resources>
+    <Grid >
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="*"></ColumnDefinition>
+            <ColumnDefinition Width="auto"></ColumnDefinition>
+        </Grid.ColumnDefinitions>
+        <Border Width="56" Height="32" Grid.Column="1" Margin="0,0,5,0" BorderThickness="1" CornerRadius="4" BorderBrush="#E2E3E6"  HorizontalAlignment="Right" >
+            <StackPanel Orientation="Horizontal">
+
+                <Ellipse x:Name="ElcustomColor" Fill="Transparent" Width="20" Height="20" PreviewMouseLeftButtonDown="ElcustomColor_PreviewMouseLeftButtonDown"></Ellipse>
+                <cus:ColorDropBox x:Name="ColorDropPicker" SelectedColorChanged="ColorDropPicker_SelectedColorChanged">
+                </cus:ColorDropBox>
+            </StackPanel>
+        </Border>
+        <cus:ColorDropBox x:Name="PnlColor" SelectedColorChanged="PnlColor_SelectedColorChanged" Opacity="0">
+        </cus:ColorDropBox>
+        
+        <ListBox x:Name="ListColor"  BorderThickness="0" Background="Transparent" 
+                 SelectionChanged="ListColor_SelectionChanged"
+                 ItemContainerStyle="{StaticResource listboxItemStyle}" ItemTemplate="{StaticResource listboxData}"
+                 >
+            <ListBox.ItemsPanel>
+                <ItemsPanelTemplate>
+                    <WrapPanel Orientation="Horizontal"/>
+                </ItemsPanelTemplate>
+            </ListBox.ItemsPanel>
+        </ListBox>
+    </Grid>
+</UserControl>

+ 174 - 0
PDF Office/CustomControl/CompositeControl/ColorContent.xaml.cs

@@ -0,0 +1,174 @@
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.CustomControl.CompositeControl
+{
+    public class ColorItem: BindableBase
+    {
+
+        private Brush _color;
+        public Brush Color
+        {
+            get { return _color; }
+            set
+            {
+                SetProperty(ref _color, value);
+            }
+        }
+
+        public Brush defaultColor { get; private set; }
+
+        private bool _isTransparent;
+        public bool IsTransparent
+        {
+            get { return _isTransparent; }
+            set
+            {
+                SetProperty(ref _isTransparent, value);
+            }
+        }
+
+        public ColorItem(Color color, bool isTransparent = false)
+        {
+            var colorBrush = new SolidColorBrush(color);
+            Color = colorBrush;
+            defaultColor = colorBrush;
+            IsTransparent = isTransparent;
+        }
+
+        public void RestoreColor()
+        {
+            Color = defaultColor;
+        }
+    }
+    /// <summary>
+    /// ColorContent.xaml 的交互逻辑
+    /// </summary>
+    public partial class ColorContent : UserControl
+    {
+        private ObservableCollection<ColorItem> colors = new ObservableCollection<ColorItem>();
+        public event EventHandler<Color> SelectedColorHandler;
+        private ColorItem ChangedColorItem;
+        public ColorContent()
+        {
+            InitializeComponent();
+            colors.Add(new ColorItem(Color.FromArgb(0xFF, 0xFF, 0xFF, 0x10)));
+            colors.Add(new ColorItem(Color.FromArgb(0xFF, 0xFF, 0x10, 0x10))); 
+            colors.Add(new ColorItem(Color.FromArgb(0xFF, 0x10, 0xFF, 0x10)));
+            colors.Add(new ColorItem(Color.FromArgb(0xFF, 0x10, 0x70, 0xFF))); 
+            ListColor.ItemsSource = colors;
+        }
+
+        private void ColorDropPicker_SelectedColorChanged(object sender, Color? e)
+        {
+            IsExistForContainer((ElcustomColor.Fill as SolidColorBrush).Color);
+            SelectedColorHandler?.Invoke(this, e.Value);
+            ElcustomColor.Fill = new SolidColorBrush(e.Value);
+        }
+
+        private void ListColor_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            if(ListColor.SelectedItem != null)
+            {
+                var item = ListColor.SelectedItem as ColorItem;
+                SelectedColorHandler?.Invoke(this, (item.Color as SolidColorBrush).Color);
+            }
+            
+        }
+
+        private void ElcustomColor_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            IsExistForContainer((ElcustomColor.Fill as SolidColorBrush).Color);
+            SelectedColorHandler?.Invoke(this, (ElcustomColor.Fill as SolidColorBrush).Color);
+            
+        }
+
+        private void PnlColor_SelectedColorChanged(object sender, Color? e)
+        {
+            ChangedColorItem.Color = new SolidColorBrush(e.Value);
+            if (ChangedColorItem == ListColor.SelectedItem as ColorItem)
+                SelectedColorHandler?.Invoke(this, (ChangedColorItem.Color as SolidColorBrush).Color);
+        }
+
+        private void ChangeColorMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+            var colorIem = (sender as FrameworkElement).DataContext as ColorItem;
+            var listBoxItem = ListColor.ItemContainerGenerator.ContainerFromItem(colorIem) as ListBoxItem;
+
+            if (listBoxItem != null)
+            {
+                ChangedColorItem = colorIem;
+                PnlColor.SelectedColor = (colorIem.Color as SolidColorBrush).Color;
+                PnlColor?.ShowLayer(listBoxItem);
+            }
+
+        }
+
+        private void BackColorMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+            var colorIem = (sender as FrameworkElement).DataContext as ColorItem;
+
+            var newColor = (colorIem.Color as SolidColorBrush).Color;
+            var oldColor = (colorIem.defaultColor as SolidColorBrush).Color;
+
+            if (newColor.A != oldColor.A || newColor.B != oldColor.B || newColor.R != oldColor.R || newColor.G != oldColor.G)
+            {
+                colorIem.RestoreColor();
+                if(colorIem == ListColor.SelectedItem as ColorItem)
+                SelectedColorHandler?.Invoke(this, (colorIem.Color as SolidColorBrush).Color);
+            }
+               
+        }
+
+        private void listboxItem_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
+        {           
+            e.Handled = true;
+        }
+
+        public void SetSelectedColor(Color newColor)
+        {
+            if (newColor != null)
+            {
+                if (IsExistForContainer(newColor) == false)
+                {
+                    ElcustomColor.Fill = new SolidColorBrush(newColor);
+                }
+            }
+
+        }
+
+        private bool IsExistForContainer(Color newColor)
+        {
+            bool isSelectList = false;
+            ListColor.SelectedItem = null;
+
+            foreach (var item in ListColor.Items)
+            {
+                var itemcontainer = ((item as ColorItem).Color as SolidColorBrush).Color;
+                if (itemcontainer.A == newColor.A && itemcontainer.R == newColor.R && itemcontainer.G == newColor.G && itemcontainer.B == newColor.B)
+                {
+                    isSelectList = true;
+                    ListColor.SelectedItem = item;
+                    break;
+                }
+            }
+
+            return isSelectList;
+        }
+
+    }
+}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 19 - 0
PDF Office/CustomControl/CompositeControl/SlidContent.xaml


+ 283 - 0
PDF Office/CustomControl/CompositeControl/SlidContent.xaml.cs

@@ -0,0 +1,283 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.CustomControl.CompositeControl
+{
+    public class AdornerPresenter : Adorner
+    {
+        private VisualCollection VisualChildren;
+        private ContentPresenter Content;
+        public AdornerPresenter(UIElement adornedElement) : base(adornedElement)
+        {
+            VisualChildren = new VisualCollection(this);
+            Content = new ContentPresenter();
+            VisualChildren.Add(Content);
+        }
+
+        protected override Size MeasureOverride(Size constraint)
+        {
+            Content.Measure(constraint);
+            return Content.DesiredSize;
+        }
+
+        protected override Size ArrangeOverride(Size finalSize)
+        {
+            Content.Arrange(new Rect(0, 0, finalSize.Width, finalSize.Height));
+            return Content.RenderSize;
+        }
+
+        protected override Visual GetVisualChild(int index)
+        {
+            return VisualChildren[index];
+        }
+
+        protected override int VisualChildrenCount
+        {
+            get
+            {
+                return VisualChildren.Count;
+            }
+        }
+
+        public object VisualContent
+        {
+            get
+            {
+                return Content.Content;
+            }
+            set
+            {
+                Content.Content = value;
+            }
+        }
+    }
+    /// <summary>
+    /// ThicknessContent.xaml 的交互逻辑
+    /// </summary>
+    public partial class SlidContent : UserControl
+    {
+        private AdornerLayer popLayer;
+        private AdornerPresenter layerPresent;
+        private bool layerAdded = false;
+        private Canvas popCanvas;
+        private SlidContentPop colorPop;
+        public  EventHandler<double> SelectedValueChanged;
+        public event PropertyChangedEventHandler PropertyChanged; 
+        protected void OnPropertyChanged([CallerMemberName] string name = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
+        }
+        private Color? _selectedColor;
+        public Color? SelectedColor
+        {
+            get
+            {
+                return _selectedColor;
+            }
+            set
+            {
+                if (_selectedColor != value)
+                {
+                    _selectedColor = value;
+                    OnPropertyChanged("SelectedColor");
+                }
+            }
+        }
+       
+        public SlidContent()
+        {
+            InitializeComponent();
+            Loaded += ColorDropBox_Loaded;
+            Unloaded += ColorDropBox_Unloaded;
+            MouseDown += ColorDropBox_MouseDown;
+            colorPop = new SlidContentPop();
+            colorPop.OpacityValueChangedHandler += colorPop_OpacityValueChangedHandler;
+        }
+
+        private void colorPop_OpacityValueChangedHandler(object sender, double e)
+        {
+            SelectedValueChanged?.Invoke(this, e);
+        }
+
+        private void ColorDropBox_Unloaded(object sender, RoutedEventArgs e)
+        {
+            if (layerAdded)
+            {
+                RemoveFromLayer();
+                return;
+            }
+        }
+
+        private void ColorDropBox_MouseDown(object sender, MouseButtonEventArgs e)
+        {
+            e.Handled = true;
+            if (layerAdded)
+            {
+                RemoveFromLayer();
+                return;
+            }
+            AddToLayer();
+        }
+
+        public void ShowLayer(DependencyObject dependencyObject = null)
+        {
+            if (layerAdded)
+            {
+                RemoveFromLayer();
+                return;
+            }
+            AddToLayer(dependencyObject);
+        }
+
+
+        private void AddToLayer(DependencyObject dependencyObject = null)
+        {
+            Window parentWnd = Window.GetWindow(this);
+            popLayer = AdornerLayer.GetAdornerLayer(parentWnd.Content as UIElement);
+            if (popLayer != null && colorPop != null && !layerAdded)
+            {
+                if (layerPresent == null)
+                {
+                    layerPresent = new AdornerPresenter(popLayer);
+                }
+                popLayer.Add(layerPresent);
+                if (popCanvas == null)
+                {
+                    popCanvas = new Canvas();
+                    popCanvas.Children.Add(colorPop);
+                    layerPresent.VisualContent = popCanvas;
+
+                //    colorPop.ColorSelected += ColorPop_ColorSelected;
+                }
+                Point offset = GetOffsetToWindow(dependencyObject);
+                colorPop.Visibility = Visibility.Visible;
+                colorPop.Measure(new Size(parentWnd.ActualWidth, parentWnd.ActualHeight));
+                colorPop.SetValue(Canvas.TopProperty, offset.Y + this.ActualHeight + 2);
+
+                if (offset.X + colorPop.DesiredSize.Width + SystemParameters.ResizeFrameVerticalBorderWidth * 2 > parentWnd.ActualWidth)
+                {
+                    colorPop.SetValue(Canvas.LeftProperty, parentWnd.ActualWidth - colorPop.DesiredSize.Width - 5 - SystemParameters.ResizeFrameVerticalBorderWidth * 2);
+                }
+                else
+                {
+                    colorPop.SetValue(Canvas.LeftProperty, offset.X);
+                }
+                layerAdded = true;
+            }
+        }
+        private void RemoveFromLayer()
+        {
+            if (popLayer != null && layerPresent != null && layerAdded)
+            {
+                popLayer.Remove(layerPresent);
+                layerAdded = false;
+            }
+        }
+
+        private void ColorDropBox_Loaded(object sender, RoutedEventArgs e)
+        {
+            if (popLayer == null)
+            {
+                Window parentWnd = Window.GetWindow(this);
+                if (parentWnd != null && parentWnd.Content is UIElement && colorPop != null)
+                {
+                    parentWnd.AddHandler(MouseDownEvent, new MouseButtonEventHandler((eventsender, param) =>
+                    {
+                        if (layerAdded)
+                        {
+                            try
+                            {
+                                Window checkWindow = Window.GetWindow(this);
+                                Point clickPoint = param.GetPosition(checkWindow);
+                                Point leftTop = TransformToVisual(checkWindow).Transform(new Point(0, 0));
+                                Point rightBottom = TransformToVisual(checkWindow).Transform(new Point(ActualWidth, ActualHeight));
+                                Point popLeftTop = new Point(Canvas.GetLeft(colorPop), Canvas.GetTop(colorPop));
+                                Point popRightBottom = new Point(colorPop.ActualWidth, colorPop.ActualHeight);
+                                Rect dropboxRect = new Rect(leftTop.X, leftTop.Y, rightBottom.X - leftTop.X, rightBottom.Y - leftTop.Y);
+                                Rect popboxRect = new Rect(popLeftTop.X, popLeftTop.Y, popRightBottom.X, popRightBottom.Y);
+                                if (dropboxRect.Contains(clickPoint) || popboxRect.Contains(clickPoint))
+                                {
+                                    return;
+                                }
+                                RemoveFromLayer();
+                            }
+                            catch (Exception ex)
+                            {
+
+                            }
+
+                        }
+                    }), true);
+                }
+            }
+        }
+
+        private void ColorPop_ColorSelected(object sender, Color e)
+        {
+            if (SelectedColor != e)
+            {
+                //NormalColorRectControl.Visibility = Visibility.Collapsed;
+                //TransparentRectControl.Visibility = Visibility.Collapsed;
+                //if (e != Colors.Transparent)
+                //{
+                //    NormalColorRectControl.Visibility = Visibility.Visible;
+                //    NormalColorRectControl.Fill = new SolidColorBrush(e);
+                //}
+                //else
+                //{
+                //    TransparentRectControl.Visibility = Visibility.Visible;
+                //}
+                SelectedColor = e;
+              //  SelectedValueChanged?.Invoke(this, SelectedColor);
+            }
+            RemoveFromLayer();
+        }
+
+        public Point GetOffsetToWindow(DependencyObject dependencyObject = null)
+        {
+            Window parentWnd = Window.GetWindow(this);
+            if (dependencyObject != null)
+            {
+                var frame = dependencyObject as FrameworkElement;
+                if (frame != null)
+                {
+                    return frame.TransformToAncestor(parentWnd).Transform(new Point(0, 0));
+                }
+            }
+
+            return TransformToAncestor(parentWnd).Transform(new Point(0, 0));
+        }
+
+        public void SetThemeColors(List<Color> themeColorList)
+        {
+            if (colorPop != null)
+            {
+              //  colorPop.ThemeColors.Clear();
+                //foreach (Color themeColor in themeColorList)
+                //{
+                //    colorPop.ThemeColors.Add(themeColor);
+                //}
+            }
+        }
+
+        public void  SetSliOpacity(double newopacity)
+        {
+            colorPop.OpacitySlider.Value = newopacity;
+        }
+
+    }
+}

+ 81 - 0
PDF Office/CustomControl/CompositeControl/SlidContentPop.xaml

@@ -0,0 +1,81 @@
+<UserControl x:Class="PDF_Office.CustomControl.CompositeControl.SlidContentPop"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
+             mc:Ignorable="d" 
+             x:Name="usercontorls"
+             d:DesignHeight="450" d:DesignWidth="800">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="../../Styles/SliderStyle.xaml"></ResourceDictionary>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+
+    </UserControl.Resources>
+    <Border CornerRadius="4" BorderBrush="Black" Background="White" BorderThickness="2" Width="270" Height="112">
+        <Grid>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="Auto"/>
+                <RowDefinition/>
+            </Grid.RowDefinitions>
+            <TextBlock Text="toumingdu" Margin="16,12,0,0"/>
+            <Grid Grid.Row="1">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition />
+                    <ColumnDefinition Width="auto"/>
+                </Grid.ColumnDefinitions>
+                <Slider Name="OpacitySlider" HorizontalAlignment="Left" VerticalAlignment="Center" Minimum="0" Maximum="1" IsSelectionRangeEnabled="True" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True"
+                     Value="50" ValueChanged="OpacitySlider_ValueChanged"
+                    Style="{StaticResource RoundThumbSlider}" Width="148" TickFrequency="0.01" 
+                   >
+                    <Slider.Resources>
+                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
+                        <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
+                    </Slider.Resources>
+                </Slider>
+
+                <Border Grid.Column="1" HorizontalAlignment="Right" Background="Transparent" BorderBrush="#E2E3E6" Width="80" Height="32" BorderThickness="0">
+                    <Grid>
+                        <ComboBox Name="OpacityDropBox" BorderThickness="1" Background="Transparent" BorderBrush="#FFE2E3E6">
+                            <ComboBoxItem Content="25%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
+
+                            </ComboBoxItem>
+
+                            <ComboBoxItem Content="50%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}" >
+
+                            </ComboBoxItem>
+                            <ComboBoxItem Content="75%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
+
+                            </ComboBoxItem>
+                            <ComboBoxItem Content="100%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}" >
+
+                            </ComboBoxItem>
+                        </ComboBox>
+
+                        <TextBox FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Margin="2,0,23,0" IsReadOnly="True"
+                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Center">
+                            <TextBox.Style>
+                                <Style TargetType="TextBox">
+                                    <Style.Setters>
+                                        <Setter Property="TextBox.Text">
+                                            <Setter.Value>
+                                                <MultiBinding StringFormat="P0">
+                                                    <Binding ElementName="OpacitySlider" Path="Value"></Binding>
+                                                </MultiBinding>
+                                            </Setter.Value>
+                                        </Setter>
+                                    </Style.Setters>
+                                </Style>
+                            </TextBox.Style>
+                        </TextBox>
+                    </Grid>
+                </Border>
+
+            </Grid>
+        </Grid>
+
+    </Border>
+</UserControl>

+ 34 - 0
PDF Office/CustomControl/CompositeControl/SlidContentPop.xaml.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.CustomControl.CompositeControl
+{
+    /// <summary>
+    /// ThicknessContentPop.xaml 的交互逻辑
+    /// </summary>
+    public partial class SlidContentPop : UserControl
+    {
+        public event EventHandler<double> OpacityValueChangedHandler;
+        public SlidContentPop()
+        {
+            InitializeComponent();
+        }
+
+        private void OpacitySlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+        {
+            OpacityValueChangedHandler?.Invoke(this, e.NewValue);
+        }
+    }
+}

+ 2 - 0
PDF Office/CustomControl/DialogContent.cs

@@ -18,6 +18,8 @@ namespace PDF_Office.CustomControl
     /// <summary>
     /// 不能使用usercontrol来实现该模块 会导致content里的控件无法命名
     /// 需要创建自定义控件 customcontrol类型
+    /// 
+    /// Content里暂时不能包含region 会注册不上,需要留意
     /// </summary>
     public class DialogContent : Control
     {

+ 2 - 2
PDF Office/CustomControl/NumericUpDown.xaml.cs

@@ -156,7 +156,7 @@ namespace PDF_Office.CustomControl
                 targetvalue = Minimum;
             }
 
-            if (targetvalue < Minimum)
+            if(targetvalue<Minimum)
             {
                 targetvalue = Minimum;
             }
@@ -168,7 +168,7 @@ namespace PDF_Office.CustomControl
         private void TextBox_Num_TextChanged(object sender, TextChangedEventArgs e)
         {
             int num = 0;
-            if (this.TextBox_Num.Text == "" || !int.TryParse(this.TextBox_Num.Text, out num))
+            if (this.TextBox_Num.Text == "" || !int.TryParse(this.TextBox_Num.Text,out num))
             {
                 this.TextBox_Num.Text = Minimum.ToString();
             }

+ 30 - 16
PDF Office/CustomControl/WritableComboBox.xaml

@@ -1,22 +1,36 @@
-<UserControl x:Class="PDF_Office.CustomControl.WritableComboBox"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:PDF_Office.CustomControl"
-             mc:Ignorable="d" 
-             d:DesignHeight="28" d:DesignWidth="200">
+<UserControl
+    x:Class="PDF_Office.CustomControl.WritableComboBox"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Office.CustomControl"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    d:DesignHeight="32"
+    d:DesignWidth="200"
+    mc:Ignorable="d">
     <Grid>
 
 
-        <ComboBox x:Name="writableComboBox" Grid.Column="1"  Visibility="Visible" MinHeight="28"  MinWidth="58"
-                                      SelectionChanged="writableComboBox_SelectionChanged" SelectedIndex="0">
-            <ComboBoxItem >全部页面</ComboBoxItem>
-            <ComboBoxItem >奇数页</ComboBoxItem>
-            <ComboBoxItem >偶数页</ComboBoxItem>
-            <ComboBoxItem >自定义页面</ComboBoxItem>
+        <ComboBox
+            x:Name="writableComboBox"
+            Grid.Column="1"
+            MinWidth="58"
+            MinHeight="32"
+            VerticalContentAlignment="Center"
+            SelectionChanged="writableComboBox_SelectionChanged"
+            Visibility="Visible">
+            <ComboBoxItem Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:WritableComboBox}, Path=IsAllPageVisible}">全部页面</ComboBoxItem>
+            <ComboBoxItem>奇数页</ComboBoxItem>
+            <ComboBoxItem>偶数页</ComboBoxItem>
+            <ComboBoxItem>自定义页面</ComboBoxItem>
         </ComboBox>
-        <TextBox  x:Name="writableTextBox" VerticalContentAlignment="Center"  Visibility="Hidden" MinHeight="{Binding ElementName=EnterableComboBox, Path=MinHeight}" Grid.Column="0" HorizontalAlignment="Left" TextChanged="writableTextBox_TextChange">
-        </TextBox>
+        <TextBox
+            x:Name="writableTextBox"
+            Grid.Column="0"
+            MinHeight="{Binding ElementName=writableComboBox, Path=MinHeight}"
+            HorizontalAlignment="Left"
+            VerticalContentAlignment="Center"
+            TextChanged="writableTextBox_TextChange"
+            Visibility="Hidden" />
     </Grid>
 </UserControl>

+ 25 - 0
PDF Office/CustomControl/WritableComboBox.xaml.cs

@@ -23,6 +23,7 @@ namespace PDF_Office.CustomControl
     /// </summary>
     public partial class WritableComboBox : UserControl
     {
+
         public bool IsCurrentPage
         {
             get { return (bool)GetValue(IsCurrentPageProperty); }
@@ -33,6 +34,30 @@ namespace PDF_Office.CustomControl
         public static readonly DependencyProperty IsCurrentPageProperty =
             DependencyProperty.Register("IsCurrentPage", typeof(bool), typeof(WritableComboBox), new PropertyMetadata(false));
 
+
+
+        public Visibility IsAllPageVisible
+        {
+            get { return (Visibility)GetValue(IsAllPageVisibleProperty); }
+            set { SetValue(IsAllPageVisibleProperty, value); 
+            }
+        }
+
+        // Using a DependencyProperty as the backing store for IsAllPageVisible.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty IsAllPageVisibleProperty =
+            DependencyProperty.Register("IsAllPageVisible", typeof(Visibility), typeof(WritableComboBox), new PropertyMetadata(Visibility.Visible,(d,e)=> {
+                if((Visibility)e.NewValue!=Visibility.Visible)
+                {
+
+                    (d as WritableComboBox).SetIndexByVisiblity((Visibility)e.NewValue);
+                }
+            }));
+
+        private void SetIndexByVisiblity(Visibility visible)
+        {
+            writableComboBox.SelectedIndex = 1;
+        }
+
         public bool CurrentPage
         {
             get { return (bool)GetValue(CurrentPageProperty); }

+ 31 - 0
PDF Office/DataConvert/FileToImageSourceConvert.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows.Media.Imaging;
+
+namespace PDF_Office.DataConvert
+{
+    /// <summary>
+    /// 文件绝对路径 转ImageSource  转换器
+    /// </summary>
+    public class FileToImageSourceConvert : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if(!string.IsNullOrEmpty((string)value)&&System.IO.File.Exists((string)value))
+            {
+                return new BitmapImage(new Uri((string)value, UriKind.Relative));
+            }
+            return null;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 38 - 0
PDF Office/DataConvert/InvertBoolConvert.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace PDF_Office.DataConvert
+{
+    public class InvertBoolConvert : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is bool)
+            {
+                if ((bool)value)
+                {
+                    return false;
+                }
+                else
+                {
+                    return true;
+                }
+            }
+            else
+            {
+                return false;
+            }
+
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 35 - 0
PDF Office/DataConvert/ObjectConvert.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace PDF_Office.DataConvert
+{
+    /// <summary>
+    /// CommandParameter 多参数传递
+    /// </summary>
+    public class ObjectConvert : IMultiValueConverter
+    {
+        #region IMultiValueConverter Members
+
+        public static object ConverterObject;
+
+        public object Convert(object[] values, Type targetType,
+          object parameter, System.Globalization.CultureInfo culture)
+        {
+            ConverterObject = values;
+            string str = values.GetType().ToString();
+            return values.ToArray();
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes,
+          object parameter, System.Globalization.CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+
+        #endregion IMultiValueConverter Members
+    }
+}

+ 79 - 0
PDF Office/DataConvert/PropertyPanelVisible.cs

@@ -0,0 +1,79 @@
+using ComPDFKitViewer.AnnotEvent;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace PDF_Office.DataConvert
+{
+
+
+    public class PropertyPanelVisible : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if(value is string)
+            {
+                var panelType = (string)value;
+                if(parameter.ToString() == panelType)
+                switch(panelType)
+                {
+                    case "HighLight":
+                        return Visibility.Visible;
+
+                    default:
+                        break;
+                }
+            }
+            return Visibility.Collapsed;
+
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+
+        }
+    }
+
+    public class CheckToVisibleMutiConvert : IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            for (int i = 0; i < values.Length; i++)
+            {
+                if ((bool)values[i] == true)
+                    return Visibility.Collapsed;
+            }
+            return Visibility.Visible;
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+
+    public class ColorToBrushConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is Color)
+            {
+                return new SolidColorBrush((Color)value);
+            }
+            return Brushes.Transparent;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+
+}

+ 65 - 0
PDF Office/DataConvert/StringToVisibleConvert.cs

@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace PDF_Office.DataConvert
+{
+    public class StringToVisibleConvert : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value == null || string.IsNullOrEmpty((string)value))
+            {
+                return Visibility.Collapsed;
+            }
+            else
+            {
+                if (value is string && (value as string).Length > 0)
+                {
+                    return Visibility.Visible;
+                }
+                else
+                {
+                    return Visibility.Collapsed;
+                }
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            return null;
+        }
+    }
+
+    public class StringToUnVisibleConvert : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value == null)
+            {
+                return Visibility.Visible;
+            }
+            else
+            {
+                if (value is string && (value as string).Length > 0)
+                {
+                    return Visibility.Collapsed;
+                }
+                else
+                {
+                    return Visibility.Visible;
+                }
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            return null;
+        }
+    }
+}

+ 8 - 2
PDF Office/DataConvert/UnVisivleConvert.cs

@@ -23,7 +23,13 @@ namespace PDF_Office.DataConvert
 
         public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
         {
-            throw new NotImplementedException();
+            if ((Visibility)value == Visibility.Visible)
+            {
+                return Visibility.Collapsed;
+            }
+            else
+                return Visibility.Visible;
+            //throw new NotImplementedException();
         }
     }
-}
+}

+ 38 - 0
PDF Office/EventAggregators/PageEditNotifyEvent.cs

@@ -17,9 +17,47 @@ namespace PDF_Office.EventAggregators
 
     public class PageEditNotifyEventArgs
     {
+
+        public PageEditNotifyEventArgs(string unicode)
+        {
+            Unicode = unicode;
+            //默认为刷新页面
+            Type = NotifyType.RefreshPage;
+        }
+
+        public PageEditNotifyEventArgs(string unicode,NotifyType type,List<int> pages)
+        {
+            Unicode = unicode;
+            Type = type;
+            PageRange = pages;
+        }
         /// <summary>
         /// 避免触发其他页签的识别码
         /// </summary>
         public string Unicode { get; set; }
+
+        /// <summary>
+        /// 通知类型
+        /// </summary>
+        public NotifyType Type { get; set; }
+
+
+        /// <summary>
+        /// 需要选中的页面范围
+        /// </summary>
+        public List<int> PageRange { get; set; }
+    }
+
+    public enum NotifyType
+    {
+        /// <summary>
+        /// 刷新页面范围
+        /// </summary>
+        RefreshPage,
+        /// <summary>
+        /// 选中项
+        /// 通过绑定Selected属性来设置选中项有更新不准确的问题
+        /// </summary>
+        SelectItems
     }
 }

+ 204 - 0
PDF Office/Helper/AdvancedInvokeCommandAction.cs

@@ -0,0 +1,204 @@
+using Microsoft.Xaml.Behaviors;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows.Input;
+using System.Windows;
+
+namespace PDF_Office.Helper
+{
+    public class CompositeCommandParameter
+    {
+        public CompositeCommandParameter(EventArgs eventArgs, object parameter)
+        {
+            EventArgs = eventArgs;
+            Parameter = parameter;
+        }
+
+        public EventArgs EventArgs { get; }
+
+        public object Parameter { get; }
+    }
+
+    public sealed class AdvancedInvokeCommandAction : TriggerAction<DependencyObject>
+    {
+        private string commandName;
+
+        public static readonly DependencyProperty CommandProperty = DependencyProperty.Register("Command", typeof(ICommand), typeof(AdvancedInvokeCommandAction), null);
+        public static readonly DependencyProperty CommandParameterProperty = DependencyProperty.Register("CommandParameter", typeof(object), typeof(AdvancedInvokeCommandAction), null);
+        public static readonly DependencyProperty EventArgsConverterProperty = DependencyProperty.Register("EventArgsConverter", typeof(IValueConverter), typeof(AdvancedInvokeCommandAction), new PropertyMetadata(null));
+        public static readonly DependencyProperty EventArgsConverterParameterProperty = DependencyProperty.Register("EventArgsConverterParameter", typeof(object), typeof(AdvancedInvokeCommandAction), new PropertyMetadata(null));
+        public static readonly DependencyProperty EventArgsParameterPathProperty = DependencyProperty.Register("EventArgsParameterPath", typeof(string), typeof(AdvancedInvokeCommandAction), new PropertyMetadata(null));
+
+        /// <summary>
+        /// Gets or sets the name of the command this action should invoke.
+        /// </summary>
+        /// <value>The name of the command this action should invoke.</value>
+        /// <remarks>This property will be superseded by the Command property if both are set.</remarks>
+        public string CommandName
+        {
+            get
+            {
+                this.ReadPreamble();
+                return this.commandName;
+            }
+            set
+            {
+                if (this.CommandName != value)
+                {
+                    this.WritePreamble();
+                    this.commandName = value;
+                    this.WritePostscript();
+                }
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the command this action should invoke. This is a dependency property.
+        /// </summary>
+        /// <value>The command to execute.</value>
+        /// <remarks>This property will take precedence over the CommandName property if both are set.</remarks>
+        public ICommand Command
+        {
+            get { return (ICommand)this.GetValue(CommandProperty); }
+            set { this.SetValue(CommandProperty, value); }
+        }
+
+        /// <summary>
+        /// Gets or sets the command parameter. This is a dependency property.
+        /// </summary>
+        /// <value>The command parameter.</value>
+        /// <remarks>This is the value passed to ICommand.CanExecute and ICommand.Execute.</remarks>
+        public object CommandParameter
+        {
+            get { return this.GetValue(AdvancedInvokeCommandAction.CommandParameterProperty); }
+            set { this.SetValue(AdvancedInvokeCommandAction.CommandParameterProperty, value); }
+        }
+
+        /// <summary>
+        /// Gets or sets the IValueConverter that is used to convert the EventArgs passed to the Command as a parameter.
+        /// </summary>
+        /// <remarks>If the <see cref="Command"/> or <see cref="EventArgsParameterPath"/> properties are set, this property is ignored.</remarks>
+        public IValueConverter EventArgsConverter
+        {
+            get { return (IValueConverter)GetValue(EventArgsConverterProperty); }
+            set { SetValue(EventArgsConverterProperty, value); }
+        }
+
+        /// <summary>
+        /// Gets or sets the parameter that is passed to the EventArgsConverter.
+        /// </summary>
+        public object EventArgsConverterParameter
+        {
+            get { return (object)GetValue(EventArgsConverterParameterProperty); }
+            set { SetValue(EventArgsConverterParameterProperty, value); }
+        }
+
+        /// <summary>
+        /// Gets or sets the parameter path used to extract a value from an <see cref= "EventArgs" /> property to pass to the Command as a parameter.
+        /// </summary>
+        /// <remarks>If the <see cref="Command"/> propert is set, this property is ignored.</remarks>
+        public string EventArgsParameterPath
+        {
+            get { return (string)GetValue(EventArgsParameterPathProperty); }
+            set { SetValue(EventArgsParameterPathProperty, value); }
+        }
+
+        /// <summary>
+        /// Specifies whether the EventArgs of the event that triggered this action should be passed to the Command as a parameter.
+        /// </summary>
+        /// <remarks>If the <see cref="Command"/>, <see cref="EventArgsParameterPath"/>, or <see cref="EventArgsConverter"/> properties are set, this property is ignored.</remarks>
+        public bool PassEventArgsToCommand { get; set; }
+
+        /// <summary>
+        /// Invokes the action.
+        /// </summary>
+        /// <param name="parameter">The parameter to the action. If the action does not require a parameter, the parameter may be set to a null reference.</param>
+        protected override void Invoke(object parameter)
+        {
+            if (this.AssociatedObject != null)
+            {
+                ICommand command = this.ResolveCommand();
+
+                if (command != null)
+                {
+                    object eventArgs = null;
+                    object commandParameter = this.CommandParameter;
+
+                    //if no CommandParameter has been provided, let's check the EventArgsParameterPath
+                    if (!string.IsNullOrWhiteSpace(this.EventArgsParameterPath))
+                    {
+                        eventArgs = GetEventArgsPropertyPathValue(parameter);
+                    }
+
+                    //next let's see if an event args converter has been supplied
+                    if (eventArgs == null && this.EventArgsConverter != null)
+                    {
+                        eventArgs = this.EventArgsConverter.Convert(parameter, typeof(object), EventArgsConverterParameter, CultureInfo.CurrentCulture);
+                    }
+
+                    //last resort, let see if they want to force the event args to be passed as a parameter
+                    if (eventArgs == null && this.PassEventArgsToCommand)
+                    {
+                        eventArgs = parameter;
+                    }
+
+                    if (command.CanExecute(commandParameter))
+                    {
+                        var compositeCommandParameter = new CompositeCommandParameter((EventArgs)eventArgs, commandParameter);
+                        command.Execute(compositeCommandParameter);
+                    }
+                }
+            }
+        }
+
+        private object GetEventArgsPropertyPathValue(object parameter)
+        {
+            object commandParameter;
+            object propertyValue = parameter;
+            string[] propertyPathParts = EventArgsParameterPath.Split('.');
+            foreach (string propertyPathPart in propertyPathParts)
+            {
+                PropertyInfo propInfo = propertyValue.GetType().GetProperty(propertyPathPart);
+                propertyValue = propInfo.GetValue(propertyValue, null);
+            }
+
+            commandParameter = propertyValue;
+            return commandParameter;
+        }
+
+        private ICommand ResolveCommand()
+        {
+            ICommand command = null;
+
+            if (this.Command != null)
+            {
+                command = this.Command;
+            }
+            else if (this.AssociatedObject != null)
+            {
+                // todo jekelly 06/09/08: we could potentially cache some or all of this information if needed, updating when AssociatedObject changes
+                Type associatedObjectType = this.AssociatedObject.GetType();
+                PropertyInfo[] typeProperties = associatedObjectType.GetProperties(BindingFlags.Public | BindingFlags.Instance);
+
+                foreach (PropertyInfo propertyInfo in typeProperties)
+                {
+                    if (typeof(ICommand).IsAssignableFrom(propertyInfo.PropertyType))
+                    {
+                        if (string.Equals(propertyInfo.Name, this.CommandName, StringComparison.Ordinal))
+                        {
+                            command = (ICommand)propertyInfo.GetValue(this.AssociatedObject, null);
+                        }
+                    }
+                }
+            }
+
+            return command;
+        }
+    }
+}

+ 624 - 0
PDF Office/Helper/ArrowHelper.cs

@@ -0,0 +1,624 @@
+using ComPDFKit.PDFAnnotation;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media;
+
+namespace PDF_Office.Helper
+{
+    public class ArrowHelper
+    {
+        /// <summary>
+        /// 是否有开始箭头
+        /// </summary>
+        public bool HasStartArrow 
+        { 
+            get 
+            {
+                if (StartSharp != C_LINE_TYPE.LINETYPE_UNKNOWN && StartSharp != C_LINE_TYPE.LINETYPE_NONE)
+                {
+                    return true;
+                }
+                return false; 
+            } 
+        }
+        /// <summary>
+        /// 开始箭头是否封闭
+        /// </summary>
+        public bool IsStartClosed
+        {
+            get
+            {
+                if (StartSharp == C_LINE_TYPE.LINETYPE_CLOSEDARROW || StartSharp == C_LINE_TYPE.LINETYPE_RCLOSEDARROW || StartSharp == C_LINE_TYPE.LINETYPE_DIAMOND)
+                {
+                    return true;
+                }
+                return false;
+            }
+        }
+        /// <summary>
+        /// 是否有结束箭头
+        /// </summary>
+        public bool HasEndArrow 
+        {
+            get
+            {
+                if (EndSharp != C_LINE_TYPE.LINETYPE_UNKNOWN && EndSharp != C_LINE_TYPE.LINETYPE_NONE)
+                {
+                    return true;
+                }
+                return false;
+            }
+        }
+        /// <summary>
+        /// 结束箭头是否封闭
+        /// </summary>
+        public bool IsEndClosed 
+        { 
+            get 
+            {
+                if(EndSharp==C_LINE_TYPE.LINETYPE_CLOSEDARROW || EndSharp==C_LINE_TYPE.LINETYPE_RCLOSEDARROW || EndSharp == C_LINE_TYPE.LINETYPE_DIAMOND)
+                {
+                    return true;
+                }
+                return false;
+            } 
+        }
+        /// <summary>
+        /// 箭头角度
+        /// </summary>
+        public uint ArrowAngle { get; set; }
+        /// <summary>
+        /// 箭头长度
+        /// </summary>
+        public uint ArrowLength { get; set; }
+        /// <summary>
+        /// 起始点
+        /// </summary>
+        public Point? LineStart { get; set; }
+        /// <summary>
+        /// 结束点
+        /// </summary>
+        public Point? LineEnd { get; set; }
+        /// <summary>
+        /// 线段路径
+        /// </summary>
+        public PathGeometry Body { get; set; }
+        /// <summary>
+        /// 开始箭头形状
+        /// </summary>
+        public C_LINE_TYPE StartSharp { get; set; }
+        /// <summary>
+        /// 结束箭头形状
+        /// </summary>
+        public C_LINE_TYPE EndSharp { get; set; }
+        /// <summary>
+        /// 箭头帮助类
+        /// </summary>
+        public ArrowHelper()
+        {
+            Body = new PathGeometry();
+            ArrowLength = 12;
+            ArrowAngle = 60;
+        }
+        protected PathFigure CreateLineBody()
+        {
+            if (LineStart != null && LineEnd != null)
+            {
+                PathFigure lineFigure = new PathFigure();
+               // lineFigure.IsClosed = true;
+                lineFigure.StartPoint = (Point)LineStart;
+                LineSegment linePath = new LineSegment();
+                linePath.Point = (Point)LineEnd;
+                //linePath.IsSmoothJoin = true;
+                //linePath.IsStroked = true;
+                lineFigure.Segments.Add(linePath);
+                return lineFigure;
+            }
+            return null;
+        }
+        protected PathFigure CreateStartArrow()
+        {
+            switch (StartSharp)
+            {
+                case C_LINE_TYPE.LINETYPE_NONE:
+                case C_LINE_TYPE.LINETYPE_UNKNOWN:
+                    break;
+                case C_LINE_TYPE.LINETYPE_ARROW:
+                case C_LINE_TYPE.LINETYPE_CLOSEDARROW:
+                    return CreateStartOpenArrow();
+                case C_LINE_TYPE.LINETYPE_ROPENARROW:
+                case C_LINE_TYPE.LINETYPE_RCLOSEDARROW:
+                    return CreateStartReverseArrow();
+                case C_LINE_TYPE.LINETYPE_BUTT:
+                    return CreateStartButtArrow();
+                case C_LINE_TYPE.LINETYPE_DIAMOND:
+                    return CreateStartDiamondArrow();
+                case C_LINE_TYPE.LINETYPE_CIRCLE:
+                    return CreateStartRoundArrow();
+                case C_LINE_TYPE.LINETYPE_SQUARE:
+                    return CreateStartSquareArrow();
+                case C_LINE_TYPE.LINETYPE_SLASH:
+                    return CreateStartSlashArrow();
+                default:
+                    break;
+            }
+            return null;
+        }
+        protected virtual PathFigure CreateEndArrow()
+        {
+            switch (EndSharp)
+            {
+                case C_LINE_TYPE.LINETYPE_NONE:
+                case C_LINE_TYPE.LINETYPE_UNKNOWN:
+                    break;
+                case C_LINE_TYPE.LINETYPE_ARROW:
+                case C_LINE_TYPE.LINETYPE_CLOSEDARROW:
+                    return CreateEndOpenArrow();
+                case C_LINE_TYPE.LINETYPE_ROPENARROW:
+                case C_LINE_TYPE.LINETYPE_RCLOSEDARROW:
+                    return CreateEndReverseArrow();
+                case C_LINE_TYPE.LINETYPE_BUTT:
+                    return CreateEndButtArrow();
+                case C_LINE_TYPE.LINETYPE_DIAMOND:
+                    return CreateEndDiamondArrow();
+                case C_LINE_TYPE.LINETYPE_CIRCLE:
+                    return CreateEndRoundArrow();
+                case C_LINE_TYPE.LINETYPE_SQUARE:
+                    return CreateEndSquareArrow();
+                case C_LINE_TYPE.LINETYPE_SLASH:
+                    return CreateEndSlashArrow();
+                default:
+                    break;
+            }
+            return null;
+        }
+        /// <summary>
+        /// 创建箭头路径
+        /// </summary>
+        /// <returns></returns>
+        public PathGeometry BuildArrowBody()
+        {
+            Body.Figures.Clear();
+            PathFigure lineBody = CreateLineBody();
+            if (lineBody != null)
+            {
+                Body.Figures.Add(lineBody);
+                PathFigure arrowFigure = CreateStartArrow();
+                if (arrowFigure != null)
+                {
+                    Body.Figures.Add(arrowFigure);
+                }
+                arrowFigure = CreateEndArrow();
+                if (arrowFigure != null)
+                {
+                    Body.Figures.Add(arrowFigure);
+                }
+            }
+            return Body;
+        }
+
+        /// <summary>
+        /// 绘制开始箭头
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateStartOpenArrow()
+        {
+            if (ArrowLength == 0 || !HasStartArrow || LineStart == null || LineEnd == null || ArrowAngle == 0)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            PolyLineSegment arrowSegment = new PolyLineSegment();
+            Vector lineVector = (Point)LineEnd - (Point)LineStart;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(ArrowAngle / 2);
+            arrowFigure.StartPoint = (Point)LineStart + (lineVector * rotateMatrix);
+            arrowSegment.Points.Add((Point)LineStart);
+            rotateMatrix.Rotate(-ArrowAngle);
+            arrowSegment.Points.Add((Point)LineStart + (lineVector * rotateMatrix));
+            arrowFigure.Segments.Add(arrowSegment);
+            arrowFigure.IsClosed = IsStartClosed;
+            arrowFigure.IsFilled = IsStartClosed;
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制结束箭头
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateEndOpenArrow()
+        {
+            if (ArrowLength == 0 || !HasEndArrow || LineStart == null || LineEnd == null || ArrowAngle == 0)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            PolyLineSegment arrowSegment = new PolyLineSegment();
+            Vector lineVector = (Point)LineStart - (Point)LineEnd;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(ArrowAngle / 2);
+            arrowFigure.StartPoint = (Point)LineEnd + (lineVector * rotateMatrix);
+            arrowSegment.Points.Add((Point)LineEnd);
+            rotateMatrix.Rotate(-ArrowAngle);
+            arrowSegment.Points.Add((Point)LineEnd + (lineVector * rotateMatrix));
+            arrowFigure.Segments.Add(arrowSegment);
+            arrowFigure.IsClosed = IsEndClosed;
+            arrowFigure.IsFilled = IsEndClosed;
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制开始箭头(逆向)
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateStartReverseArrow()
+        {
+            if (ArrowLength == 0 || !HasStartArrow || LineStart == null || LineEnd == null || ArrowAngle == 0)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            PolyLineSegment arrowSegment = new PolyLineSegment();
+            Vector lineVector = (Point)LineStart - (Point)LineEnd;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(ArrowAngle / 2);
+            arrowFigure.StartPoint = (Point)LineStart + (lineVector * rotateMatrix);
+            arrowSegment.Points.Add((Point)LineStart);
+            rotateMatrix.Rotate(-ArrowAngle);
+            arrowSegment.Points.Add((Point)LineStart + (lineVector * rotateMatrix));
+            arrowFigure.Segments.Add(arrowSegment);
+            arrowFigure.IsClosed = IsStartClosed;
+            arrowFigure.IsFilled = IsStartClosed;
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制结束箭头(逆向)
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateEndReverseArrow()
+        {
+            if (ArrowLength == 0 || !HasEndArrow || LineStart == null || LineEnd == null || ArrowAngle == 0)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            PolyLineSegment arrowSegment = new PolyLineSegment();
+            Vector lineVector = (Point)LineEnd - (Point)LineStart;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(ArrowAngle / 2);
+            arrowFigure.StartPoint = (Point)LineEnd + (lineVector * rotateMatrix);
+            arrowSegment.Points.Add((Point)LineEnd);
+            rotateMatrix.Rotate(-ArrowAngle);
+            arrowSegment.Points.Add((Point)LineEnd + (lineVector * rotateMatrix));
+            arrowFigure.Segments.Add(arrowSegment);
+            arrowFigure.IsClosed = IsEndClosed;
+            arrowFigure.IsFilled = IsEndClosed;
+            return arrowFigure;
+        }
+
+        /// <summary>
+        /// 绘制开始平头
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateStartButtArrow()
+        {
+            if (ArrowLength == 0 || !HasStartArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            LineSegment buttSegment = new LineSegment();
+            Vector lineVector = (Point)LineStart - (Point)LineEnd;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(90);
+            arrowFigure.StartPoint = (Point)LineStart + (lineVector * rotateMatrix);
+            rotateMatrix.Rotate(-180);
+            buttSegment.Point = ((Point)LineStart + (lineVector * rotateMatrix));
+            arrowFigure.Segments.Add(buttSegment);
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制结束平头
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateEndButtArrow()
+        {
+            if (ArrowLength == 0 || !HasEndArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            LineSegment buttSegment = new LineSegment();
+            Vector lineVector = (Point)LineEnd - (Point)LineStart;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(90);
+            arrowFigure.StartPoint = (Point)LineEnd + (lineVector * rotateMatrix);
+            rotateMatrix.Rotate(-180);
+            buttSegment.Point = ((Point)LineEnd + (lineVector * rotateMatrix));
+            arrowFigure.Segments.Add(buttSegment);
+
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制开始菱形
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateStartDiamondArrow()
+        {
+            if (ArrowLength == 0 || !HasStartArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            PolyLineSegment arrowSegment = new PolyLineSegment();
+            Vector lineVector = (Point)LineStart - (Point)LineEnd;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(45);
+
+            Point cornerTop = (Point)LineStart + (lineVector * rotateMatrix);
+
+            Vector turnVector = cornerTop - (Point)LineStart;
+            turnVector.Normalize();
+            turnVector *= ArrowLength;
+            Matrix turnMatrix = new Matrix();
+            turnMatrix.Rotate(-90);
+            Point awayPoint = cornerTop + (turnVector * turnMatrix);
+
+            rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(-45);
+            Point cornerDown = (Point)LineStart + (lineVector * rotateMatrix);
+
+            arrowFigure.StartPoint = (Point)LineStart;
+            arrowSegment.Points.Add(cornerTop);
+            arrowSegment.Points.Add(awayPoint);
+            arrowSegment.Points.Add(cornerDown);
+            arrowSegment.Points.Add((Point)LineStart);
+
+            arrowFigure.Segments.Add(arrowSegment);
+            arrowFigure.IsClosed = IsStartClosed;
+            arrowFigure.IsFilled = IsStartClosed;
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制结束菱形
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateEndDiamondArrow()
+        {
+
+            if (ArrowLength == 0 || !HasEndArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            PolyLineSegment arrowSegment = new PolyLineSegment();
+            Vector lineVector = (Point)LineEnd - (Point)LineStart;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(45);
+
+            Point cornerTop = (Point)LineEnd + (lineVector * rotateMatrix);
+
+            Vector turnVector = cornerTop - (Point)LineEnd;
+            turnVector.Normalize();
+            turnVector *= ArrowLength;
+            Matrix turnMatrix = new Matrix();
+            turnMatrix.Rotate(-90);
+            Point awayPoint = cornerTop + (turnVector * turnMatrix);
+
+            rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(-45);
+            Point cornerDown = (Point)LineEnd + (lineVector * rotateMatrix);
+
+            arrowFigure.StartPoint = (Point)LineEnd;
+            arrowSegment.Points.Add(cornerTop);
+            arrowSegment.Points.Add(awayPoint);
+            arrowSegment.Points.Add(cornerDown);
+            arrowSegment.Points.Add((Point)LineEnd);
+
+            arrowFigure.Segments.Add(arrowSegment);
+            arrowFigure.IsClosed = IsEndClosed;
+            arrowFigure.IsFilled = IsEndClosed;
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制开始圆形
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateStartRoundArrow()
+        {
+            if (ArrowLength == 0 || !HasStartArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            Vector lineVector = (Point)LineEnd - (Point)LineStart;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(180);
+            arrowFigure.StartPoint = (Point)LineStart + (lineVector * rotateMatrix);
+            ArcSegment circleSegment = new ArcSegment();
+            circleSegment.Point = (Point)LineStart;
+            circleSegment.Size = new Size(ArrowLength / 2, ArrowLength / 2);
+            arrowFigure.Segments.Add(circleSegment);
+            circleSegment = new ArcSegment();
+            circleSegment.Point = (Point)arrowFigure.StartPoint;
+            circleSegment.Size = new Size(ArrowLength / 2, ArrowLength / 2);
+
+            arrowFigure.Segments.Add(circleSegment);
+
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制结束圆形
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateEndRoundArrow()
+        {
+            if (ArrowLength == 0 || !HasEndArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            Vector lineVector = (Point)LineStart - (Point)LineEnd;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(180);
+            arrowFigure.StartPoint = (Point)LineEnd + (lineVector * rotateMatrix);
+            ArcSegment circleSegment = new ArcSegment();
+            circleSegment.Point = (Point)LineEnd;
+            circleSegment.Size = new Size(ArrowLength / 2, ArrowLength / 2);
+            arrowFigure.Segments.Add(circleSegment);
+            circleSegment = new ArcSegment();
+            circleSegment.Point = (Point)arrowFigure.StartPoint;
+            circleSegment.Size = new Size(ArrowLength / 2, ArrowLength / 2);
+
+            arrowFigure.Segments.Add(circleSegment);
+
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制开始方形
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateStartSquareArrow()
+        {
+            if (ArrowLength == 0 || !HasStartArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            PolyLineSegment squreSegment = new PolyLineSegment();
+
+            Vector lineVector = (Point)LineEnd - (Point)LineStart;
+            lineVector.Normalize();
+            lineVector *= (ArrowLength / 2);
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(90);
+            arrowFigure.StartPoint = (Point)LineStart + (lineVector * rotateMatrix);
+            rotateMatrix.Rotate(-180);
+            Point pointCorner = (Point)LineStart + (lineVector * rotateMatrix);
+            squreSegment.Points.Add(pointCorner);
+
+            Vector moveVector = arrowFigure.StartPoint - pointCorner;
+            moveVector.Normalize();
+            moveVector *= (ArrowLength);
+            rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(90);
+
+            squreSegment.Points.Add(pointCorner + (moveVector * rotateMatrix));
+            squreSegment.Points.Add(arrowFigure.StartPoint + (moveVector * rotateMatrix));
+            squreSegment.Points.Add(arrowFigure.StartPoint);
+            squreSegment.Points.Add((Point)LineStart);
+            arrowFigure.Segments.Add(squreSegment);
+
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制结束方形
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateEndSquareArrow()
+        {
+
+            if (ArrowLength == 0 || !HasEndArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            PolyLineSegment squreSegment = new PolyLineSegment();
+
+            Vector lineVector = (Point)LineStart - (Point)LineEnd;
+            lineVector.Normalize();
+            lineVector *= (ArrowLength / 2);
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(90);
+            arrowFigure.StartPoint = (Point)LineEnd + (lineVector * rotateMatrix);
+            rotateMatrix.Rotate(-180);
+            Point pointCorner = (Point)LineEnd + (lineVector * rotateMatrix);
+            squreSegment.Points.Add(pointCorner);
+
+            Vector moveVector = arrowFigure.StartPoint - pointCorner;
+            moveVector.Normalize();
+            moveVector *= (ArrowLength);
+            rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(90);
+
+            squreSegment.Points.Add(pointCorner + (moveVector * rotateMatrix));
+            squreSegment.Points.Add(arrowFigure.StartPoint + (moveVector * rotateMatrix));
+            squreSegment.Points.Add(arrowFigure.StartPoint);
+            squreSegment.Points.Add((Point)LineEnd);
+            arrowFigure.Segments.Add(squreSegment);
+
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制开始斜线
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateStartSlashArrow()
+        {
+            if (ArrowLength == 0 || !HasStartArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            LineSegment buttSegment = new LineSegment();
+            Vector lineVector = (Point)LineStart - (Point)LineEnd;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(45);
+            arrowFigure.StartPoint = (Point)LineStart + (lineVector * rotateMatrix);
+            rotateMatrix.Rotate(-180);
+            buttSegment.Point = ((Point)LineStart + (lineVector * rotateMatrix));
+            arrowFigure.Segments.Add(buttSegment);
+            return arrowFigure;
+        }
+        /// <summary>
+        /// 绘制结束斜线
+        /// </summary>
+        /// <returns></returns>
+        private PathFigure CreateEndSlashArrow()
+        {
+            if (ArrowLength == 0 || !HasEndArrow || LineStart == null || LineEnd == null)
+            {
+                return null;
+            }
+            PathFigure arrowFigure = new PathFigure();
+            LineSegment buttSegment = new LineSegment();
+            Vector lineVector = (Point)LineEnd - (Point)LineStart;
+            lineVector.Normalize();
+            lineVector *= ArrowLength;
+            Matrix rotateMatrix = new Matrix();
+            rotateMatrix.Rotate(45);
+            arrowFigure.StartPoint = (Point)LineEnd + (lineVector * rotateMatrix);
+            rotateMatrix.Rotate(-180);
+            buttSegment.Point = ((Point)LineEnd + (lineVector * rotateMatrix));
+            arrowFigure.Segments.Add(buttSegment);
+
+            return arrowFigure;
+        }
+    }
+}

+ 57 - 5
PDF Office/Views/HomePanel/PDFTools/PDFTools.cs

@@ -1,11 +1,13 @@
 using PDF_Office.Model.PDFTool;
+using PDF_Office.Properties;
+using PDFSettings;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace PDF_Office.Views.HomePanel.PDFTools
+namespace PDF_Office.Helper
 {
     public enum PDFToolType
     {
@@ -30,11 +32,11 @@ namespace PDF_Office.Views.HomePanel.PDFTools
         CompareDoc
 
     }
-    public class PDFTools
+    public class PDFToolsHelper
     {
         public List<ToolItem> AllTools = null;
         public List<ToolItem> QuickTools = null;
-        public PDFTools()
+        public PDFToolsHelper()
         {
             InitPDFTools();
         }
@@ -48,26 +50,75 @@ namespace PDF_Office.Views.HomePanel.PDFTools
 
         private void InitAllTools()
         {
-            string path = @"pack://application:,,,/Resources/PromotionIcon/Windows.png";
+            string path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/split.png";
             AddToolItem(PDFToolType.Split, path, "拆分", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/extract.png";
             AddToolItem(PDFToolType.Extract, path, "提取", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/insert.png";
             AddToolItem(PDFToolType.Insert, path, "插入", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/compress.png";
             AddToolItem(PDFToolType.Compress, path, "压缩", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/merge.png";
             AddToolItem(PDFToolType.Merge, path, "合并", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/print.png";
             AddToolItem(PDFToolType.Print, path, "打印", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/security.png";
             AddToolItem(PDFToolType.Security, path, "安全", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/convert.png";
             AddToolItem(PDFToolType.ConvertPDF, path, "转档PDF", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/pdf-to-word.png";
             AddToolItem(PDFToolType.PDFToWord, path, "PDF转Word", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/pdf-to-excel.png";
             AddToolItem(PDFToolType.PDFToExcel, path, "PDF转Excel", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/pdf-to-ppt.png";
             AddToolItem(PDFToolType.PDFToPPT, path, "PDF转PPT", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/image.png";
             AddToolItem(PDFToolType.ImageToPDF, path, "图片转PDF", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/ocr.png";
             AddToolItem(PDFToolType.OCR, path, "OCR", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/watermark.png";
             AddToolItem(PDFToolType.WaterMark, path, "水印", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/header&footer.png";
             AddToolItem(PDFToolType.HeaderFooter, path, "页眉页脚", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/batesnumbers.png";
             AddToolItem(PDFToolType.BatesNumbers, path, "贝茨Bates码", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/batch.png";
             AddToolItem(PDFToolType.Batch, path, "批量处理", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/background.png";
             AddToolItem(PDFToolType.Background, path, "背景", "Batch convert, compress, secure, watermark PDFs.");
+
+            path = @"pack://application:,,,/Resources/HomeIcon/PDFTools/compress.png";
             AddToolItem(PDFToolType.CompareDoc, path, "文件对比", "Batch convert, compress, secure, watermark PDFs.");
+
+           
+        }
+
+        private void ContianNewTools()
+        {
+            if (Settings.Default.AllPDFToolsList != null)
+            {
+                foreach(var item in AllTools)
+                {
+                    Settings.Default.AllPDFToolsList.FirstOrDefault(tool => tool.Tag == item.Tag);
+                }
+            }
         }
 
         private void AddToolItem(PDFToolType toolType, string imgPath,string title,string titleInfo,int id = 0)
@@ -75,7 +126,8 @@ namespace PDF_Office.Views.HomePanel.PDFTools
             ToolItem toolItem = new ToolItem();
 
             toolItem.Id = id;
-            toolItem.Tag = toolType;
+            toolItem.Tag = (int)toolType;
+            toolItem.TagStr = Enum.GetName(typeof(PDFToolType), toolType);
             toolItem.Image = imgPath;
             toolItem.Title = title;
             toolItem.TitleInfo = titleInfo;

+ 28 - 0
PDF Office/Helper/SetterAction.cs

@@ -0,0 +1,28 @@
+using Microsoft.Xaml.Behaviors;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace PDF_Office.Helper
+{
+    public class SetterAction : TriggerAction<DependencyObject>
+    {
+        public SetterAction()
+        {
+            Setters = new List<Setter>();
+        }
+
+        public List<Setter> Setters { get; set; }
+
+        protected override void Invoke(object parameter)
+        {
+            foreach (var item in Setters)
+            {
+                AssociatedObject.SetValue(item.Property, item.Value);
+            }
+        }
+    }
+}

+ 14 - 14
PDF Office/Helper/SettingHelper.cs

@@ -146,25 +146,25 @@ namespace PDF_Office.Helper
 
         public static DefaultAnnotProperty GetAnnotDefaultProperty(AnnotArgsType annotToolType,string saveKey="")
         {
-            //if (Settings.Default.DefautAnnotProperties != null)
-            //{
-            //    if(saveKey=="")
-            //    {
-            //        return Settings.Default.DefautAnnotProperties.GetAnnotProperty(annotToolType);
-            //    }
-            //    return Settings.Default.DefautAnnotProperties.GetAnnotProperty(annotToolType,saveKey);
-            //}
+            if (Settings.Default.DefautAnnotProperties != null)
+            {
+                if (saveKey == "")
+                {
+                    return Settings.Default.DefautAnnotProperties.GetAnnotProperty(annotToolType);
+                }
+                return Settings.Default.DefautAnnotProperties.GetAnnotProperty(annotToolType, saveKey);
+            }
             return null;
         }
 
         public static void SetAnnotDefaultProperty(DefaultAnnotProperty annotProperty)
         {
-            //if (Settings.Default.DefautAnnotProperties == null)
-            //{
-            //    Settings.Default.DefautAnnotProperties = new DefaultAnnotProperties();
-            //}
-            //Settings.Default.DefautAnnotProperties.SetAnnotProperty(annotProperty);
-            //Settings.Default.Save();
+            if (Settings.Default.DefautAnnotProperties == null)
+            {
+                Settings.Default.DefautAnnotProperties = new DefaultAnnotProperties();
+            }
+            Settings.Default.DefautAnnotProperties.SetAnnotProperty(annotProperty);
+            Settings.Default.Save();
         }
         private static string KeyAlaphabet = "0123456789ABCDEFGHIGKLMNOPQRSTUVWXYZ";
         public static char NumberToChar(int num)

+ 241 - 5
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageSplitDialogModel.cs

@@ -1,4 +1,5 @@
-using System;
+using Prism.Mvvm;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -6,7 +7,7 @@ using System.Threading.Tasks;
 
 namespace PDF_Office.Model.HomePageToolsDialogs
 {
-    public class HomePageSplitDialogModel
+    public class HomePageSplitDialogModel:BindableBase
     {
 
         /// <summary>
@@ -14,6 +15,10 @@ namespace PDF_Office.Model.HomePageToolsDialogs
         /// </summary>
         public SplitMode Mode = SplitMode.AveragePages;
         /// <summary>
+        /// 页面范围形式
+        /// </summary>
+        public PageRangeMode PageMode = PageRangeMode.OddPage;
+        /// <summary>
         /// 拆分模式份数或者页数
         /// </summary>
         public int GetModeCount = 1;
@@ -21,14 +26,175 @@ namespace PDF_Office.Model.HomePageToolsDialogs
         /// 页面信息
         /// </summary>
         public string PageRange = "1,3-4,10";
+
+        private int pageSelectedIndex = 1;
+
+        public int PageSelectedIndex
+        {
+            get { return pageSelectedIndex; }
+            set
+            {
+                SetProperty(ref pageSelectedIndex, value);
+                switch (value)
+                {
+                    case 1:
+                        PageMode = PageRangeMode.OddPage;
+                        break;
+                    case 2:
+                        PageMode = PageRangeMode.EvenPage;
+                        break;
+                    case 3:
+                        PageMode = PageRangeMode.CustomPage;
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
+
+
+
+        private double pageNum = 1;
+        /// <summary>
+        /// 平均页数
+        /// </summary>
+        public double PageNum
+        {
+            get { return pageNum; }
+            set
+            {
+                SetProperty(ref pageNum, value);
+                GetModeCount = (int)value;
+            }
+        }
+
+        private double filesCount = 1;
+        /// <summary>
+        /// 平均文件数
+        /// </summary>
+        public double FilesCount
+        {
+            get { return filesCount; }
+            set
+            {
+                SetProperty(ref filesCount, value);
+                GetModeCount = (int)value;
+            }
+        }
+
+        private bool isAveragePages = true;
+        /// <summary>
+        /// 平均按页拆分 是否选中
+        /// </summary>
+        public bool IsAveragePages
+        {
+            get { return isAveragePages; }
+            set
+            {
+                SetProperty(ref isAveragePages, value);
+                if(value)
+                {
+                    Mode = SplitMode.AveragePages;
+                }
+            }
+        }
+
+        private bool isAveragePDF = false;
+        /// <summary>
+        /// 平均按PDF拆分 是否选中
+        /// </summary>
+        public bool IsAveragePDF
+        {
+            get { return isAveragePDF; }
+            set
+            {
+                SetProperty(ref isAveragePDF, value);
+                if (value)
+                {
+                    Mode = SplitMode.AverageFiles;
+                }
+            }
+        }
+
+
+        private bool isCustomRange = false;
+        /// <summary>
+        /// 自定义页面范围,是否选中
+        /// </summary>
+
+        public bool IsCustomRange
+        {
+            get { return isCustomRange; }
+            set
+            {
+                SetProperty(ref isCustomRange, value);
+                if (value)
+                {
+                    Mode = SplitMode.CustomPageRange;
+                }
+            }
+        }
+
         /// <summary>
         /// 文件名标签
         /// </summary>
-        public string FileNameLabel = "part";
+        private string fileNameLabel = "part";
+
+        public string FileNameLabel
+        {
+            get { return fileNameLabel; }
+            set
+            {
+                SetProperty(ref fileNameLabel, value);
+                RefreshFileName();
+            }
+        }
+
+        private bool hasLabel = true;
+        /// <summary>
+        /// 是否含有标签
+        /// </summary>
+        public bool HasLabel
+        {
+            get { return hasLabel; }
+            set
+            {
+                SetProperty(ref hasLabel, value);
+                RefreshFileName();
+            }
+        }
+
+
         /// <summary>
         /// 文件名与标签分隔符
         /// </summary>
-        public string FileNameDeimiter = "-";
+        private string fileNameDeimiter="-";
+
+        public string FileNameDeimiter
+        {
+            get { return fileNameDeimiter; }
+            set
+            {
+                SetProperty(ref fileNameDeimiter, value);
+                RefreshFileName();
+            }
+        }
+
+        private bool hasDeimiter = true;
+        /// <summary>
+        /// 是否含有分隔符
+        /// </summary>
+        public bool HasDeimiter
+        {
+            get { return hasDeimiter; }
+            set
+            {
+                SetProperty(ref hasDeimiter, value);
+                RefreshFileName();
+            }
+        }
+
+
         /// <summary>
         /// 文件名与标签分隔符
         /// </summary>
@@ -40,7 +206,61 @@ namespace PDF_Office.Model.HomePageToolsDialogs
         /// <summary>
         /// 文件名;
         /// </summary>
-        public string FileName = "";
+        private string fileName = "";
+
+        public string FileName
+        {
+            get { return fileName; }
+            set
+            {
+                SetProperty(ref fileName, value);
+            }
+        }
+
+        private bool isSourceNameFront = true;
+        /// <summary>
+        /// 原始文档名前置
+        /// </summary>
+        public bool  IsSourceNameFront
+        {
+            get { return isSourceNameFront; }
+            set
+            {
+                SetProperty(ref isSourceNameFront, value);
+                RefreshFileName();
+            }
+        }
+
+        private string sourceName;
+        /// <summary>
+        /// 原始文件名
+        /// </summary>
+        public string SourceFileName
+        {
+            get { return sourceName; }
+            set
+            {
+                SetProperty(ref sourceName, value);
+                RefreshFileName();
+            }
+        }
+
+        /// <summary>
+        /// 刷新文件名
+        /// </summary>
+        public void RefreshFileName()
+        {
+            string label = HasLabel ? FileNameLabel : "";
+            string deimiter = hasDeimiter ? FileNameDeimiter : "";
+            if(isSourceNameFront)
+            {
+                FileName = SourceFileName + deimiter + label + ".pdf";
+            }
+            else
+            {
+                FileName = label + deimiter + SourceFileName + ".pdf";
+            }
+        }
 
         public enum SplitMode
         {
@@ -57,5 +277,21 @@ namespace PDF_Office.Model.HomePageToolsDialogs
             /// </summary>
             CustomPageRange
         }
+
+        public enum PageRangeMode
+        {
+            /// <summary>
+            /// 奇数页
+            /// </summary>
+            OddPage,
+            /// <summary>
+            /// 偶数页
+            /// </summary>
+            EvenPage,
+            /// <summary>
+            /// 自定义页面范围
+            /// </summary>
+            CustomPage
+        }
     }
 }

+ 9 - 4
PDF Office/Model/DialogNames.cs

@@ -44,7 +44,8 @@ namespace PDF_Office.Model
         /// <summary>
         /// 进度条
         /// </summary>
-        public static string CompressProgressBarDialog = "CompressProgressBarDialog"; 
+        public static string CompressProgressBarDialog = "CompressProgressBarDialog";
+
         /// <summary>
         /// 页面编辑- 提取弹窗
         /// </summary>
@@ -85,11 +86,15 @@ namespace PDF_Office.Model
         /// </summary>
         public static string HomePagePrinterPageSetDialog = "HomePagePrinterPageSetDialog";
 
-        ///<summary>
-        ///主页工具-图片转PDF弹窗
+        ///<summary>
+        ///主页工具-图片转PDF弹窗
         /// </summary>
         public static string HomePagePictureToPDFDialog = "HomePagePictureToPDFDialog";
 
+        /// <summary>
+        ///BOTA-书签-添加书签弹窗
+        /// </summary>
+        public static string AddBookmarkDialog = "AddBookmarkDialog";
         ///<summary>
         ///主页工具-PDF批量工具
         /// </summary>
@@ -111,4 +116,4 @@ namespace PDF_Office.Model
         /// </summary>
         public static string ConverterProgressBarDialog = "ConverterProgressBarDialog";
     }
-}
+}

+ 0 - 28
PDF Office/Model/HomePageToolsDialogs/HomePageExtractDialogModel.cs

@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PDF_Office.Model.HomePageToolsDialogs
-{
-    public class HomePageExtractDialogModel
-    {
-        /// <summary>
-        /// 页码 存入页码范围;
-        /// </summary>
-        public List<int> PageParm=new List<int> { };
-        /// <summary>
-        /// 页码 存入页码范围;
-        /// </summary>
-        public string PageRange="1,3-4,10";
-        /// <summary>
-        /// 是否拆分为单文件
-        /// </summary>
-        public bool ExtractToSingleFile=true;
-        /// <summary>
-        /// 提取后删除页面
-        /// </summary>
-        public bool DeleteAfterExtract=false;
-    }
-}

+ 0 - 22
PDF Office/Model/HomePageToolsDialogs/HomePageInsertDialogModel.cs

@@ -1,22 +0,0 @@
-using ComPDFKit.PDFDocument;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PDF_Office.Model.HomePageToolsDialogs
-{
-    public class HomePageInsertDialogModel
-    {
-        public string FilePath = "";
-        public int InsertIndex = 1;
-        public string Password = "";
-        public string InserPageRange(CPDFDocument doc) {
-            if (doc.PageCount < 1) { return ""; }
-            if (doc.PageCount == 1) { return "1"; }
-            return "1"+"-"+ doc.PageCount.ToString();
-        }
-
-    }
-}

+ 0 - 58
PDF Office/Model/HomePageToolsDialogs/HomePageSplitDialogModel.cs

@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PDF_Office.Model.HomePageToolsDialogs
-{
-    public class HomePageSplitDialogModel
-    {
-
-        /// <summary>
-        /// 拆分模式
-        /// </summary>
-        public SplitMode Mode = SplitMode.AveragePages;
-        /// <summary>
-        /// 拆分模式份数或者页数
-        /// </summary>
-        public int GetModeCount = 1;
-        /// <summary>
-        /// 页面信息
-        /// </summary>
-        public string PageRange = "1,3-4,10";
-        /// <summary>
-        /// 文件名标签
-        /// </summary>
-        public string FileNameLabel = "part";
-        /// <summary>
-        /// 文件名与标签分隔符
-        /// </summary>
-        public string FileNameDeimiter = "-";
-        /// <summary>
-        /// 文件名与标签分隔符
-        /// </summary>
-        public bool FrontFileName = true;
-        /// <summary>
-        /// 页码 存入页码范围;
-        /// </summary>
-        public List<int> PageParm = new List<int> { };
-
-
-        public enum SplitMode
-        {
-            /// <summary>
-            /// 按页平均拆分
-            /// </summary>
-            AveragePages,
-            /// <summary>
-            /// 按文件平均拆分
-            /// </summary>
-            AverageFiles,
-            /// <summary>
-            /// 自定义页码范围拆分
-            /// </summary>
-            CustomPageRange
-        }
-    }
-}

+ 0 - 28
PDF Office/Model/MainPageToolsDialogs/MainPageExtractDialogModel.cs

@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PDF_Office.Model.MainPageToolsDialogs
-{
-    internal class MainPageExtractDialogModel
-    {
-        /// <summary>
-        /// 页码 存入页码范围;
-        /// </summary>
-        public List<int> PageParm;
-        /// <summary>
-        /// 自定模式下 把文本内容传过去
-        /// </summary>
-        public string PageName = "";
-        /// <summary>
-        /// 是否拆分为单文件
-        /// </summary>
-        public bool ExtractToSingleFile;
-        /// <summary>
-        /// 提取后删除页面
-        /// </summary>
-        public bool DeleteAfterExtract;
-    }
-}

+ 0 - 26
PDF Office/Model/MainPageToolsDialogs/MainPageInsertDialogModel.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PDF_Office.Model.MainPageToolsDialogs
-{
-    internal class MainPageInsertDialogModel
-    {
-        public class InsertEventClass : EventArgs
-        {
-            public InsertType Type;
-            public string filePath;
-            public string pageRange;
-            public int InsertIndex;
-            public string Password;
-        }
-
-        public enum InsertType
-        {
-            BlankPages,
-            FromOtherPdf
-        }
-    }
-}

+ 0 - 44
PDF Office/Model/MainPageToolsDialogs/MainPageSplitDialogModel.cs

@@ -1,44 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PDF_Office.Model.MainPageToolsDialogs
-{
-    internal class MainPageSplitDialogModel
-    {
-        public class SplitEventClass : EventArgs
-        {
-            /// <summary>
-            /// 拆分模式
-            /// </summary>
-            public SplitMode Mode;
-            /// <summary>
-            /// 文件名
-            /// </summary>
-            public string FileName;
-            /// <summary>
-            /// 页面信息
-            /// </summary>
-            public string PageRange;
-
-        }
-
-        public enum SplitMode
-        {
-            /// <summary>
-            /// 按页平均拆分
-            /// </summary>
-            AveragePages,
-            /// <summary>
-            /// 按文件平均拆分
-            /// </summary>
-            AverageFiles,
-            /// <summary>
-            /// 自定义页码范围拆分
-            /// </summary>
-            CustomPageRange
-        }
-    }
-}

+ 12 - 2
PDF Office/Model/PDFTool/ToolItem.cs

@@ -1,4 +1,4 @@
-using PDF_Office.Views.HomePanel.PDFTools;
+using PDF_Office.Helper;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
@@ -8,8 +8,18 @@ using System.Threading.Tasks;
 
 namespace PDF_Office.Model.PDFTool
 {
-    public class ToolItem : BindableBase
+    public class ToolItem1 : BindableBase
     {
+        private bool _isShowConciseContent = false;
+        public bool IsShowConciseContent
+        {
+            get { return _isShowConciseContent; }
+            set
+            {
+                SetProperty(ref _isShowConciseContent, value);
+            }
+        }
+        public bool IsNewTool { get; set; }
         public int Id { get; set; }
         public PDFToolType Tag { get; set; }
         public string Image { get; set; }

+ 26 - 0
PDF Office/Model/PageEdit/CustomInsertModel.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.PageEdit
+{
+    public class CustomInsertModel
+    {
+        /// <summary>
+        /// 图片路径
+        /// </summary>
+        public string filepath { get; set; }
+
+        /// <summary>
+        /// 页面宽度
+        /// </summary>
+        public int width { get; set; }
+
+        /// <summary>
+        /// 页面高度
+        /// </summary>
+        public int height { get; set; }
+    }
+}

+ 24 - 0
PDF Office/Model/PageEdit/CustomPageItem.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.Model.PageEdit
+{
+    /// <summary>
+    /// 插入自定义页面的 页面项
+    /// </summary>
+    public class CustomPageItem
+    {
+        /// <summary>
+        /// 名称
+        /// </summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 图片路径
+        /// </summary>
+        public string FilePath { get; set; }
+    }
+}

+ 28 - 6
PDF Office/Model/ParameterNames.cs

@@ -11,6 +11,14 @@ namespace PDF_Office.Model
     /// </summary>
     public static class ParameterNames
     {
+        #region ViewModelName
+        public static string MainViewModel = "MainViewModel";
+
+        public static string ViewContentViewModel = "ViewContentViewModel";
+
+        public static string PropertyPanelContentViewModel = "PropertyPanelContentViewModel";
+        #endregion
+
         public static string PDFViewer = "PDFViewer";
 
         public static string FilePath = "FilePath";
@@ -21,11 +29,6 @@ namespace PDF_Office.Model
 
         public static string AddTab = "AddTab";
 
-        public static string MainViewModel = "MainViewModel";
-
-        public static string ViewContentViewModel = "ViewContentViewModel";
-
-
         public static string InsertType_File = "Insert_File";
 
         public static string InsertType_Blank = "Insert_Blank";
@@ -34,6 +37,25 @@ namespace PDF_Office.Model
 
         public static string BatchProcessing_Name = "BatchProcessing_Name";
 
+        /// <summary>
+        /// 书签
+        /// </summary>
+        public static string Bookmark = "Bookmark";
+
+        public static string Title = "Title";
+
+        public static string BookmarkInfo = "BookmarkInfo";
+
+        /// <summary>
+        /// 底部工具栏
+        /// </summary>
+        public static string BottomToolContentViewModel = "BottomToolContentViewModel";
+
+        /// <summary>
+        /// BOTA缩略图
+        /// </summary>
+        public static string BOTAThumb = "Thumbnail";
+
         /// <summary>
         /// 用于弹窗传参的数据模型
         /// </summary>
@@ -49,4 +71,4 @@ namespace PDF_Office.Model
         /// </summary>
         public static string ConverterTypeModel = "ConverterTypeModel";
     }
-}
+}

+ 150 - 1
PDF Office/Model/RegionNames.cs

@@ -1,16 +1,165 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Runtime.CompilerServices;
 using System.Text;
 using System.Threading.Tasks;
 
 namespace PDF_Office.Model
 {
+    /// <summary>
+    /// 存放公用模块的RegionName
+    /// </summary>
     public static class RegionNames
     {
         /// <summary>
         /// 最外层的Region名称
         /// </summary>
         public static string MainRegion = "MainRegion";
+
+        /// <summary>
+        /// 首页右侧快捷工具Content RegionName
+        /// </summary>
+        public static string ToolRegionName
+        {
+            get
+            {
+                return GetRegionName("ToolRegionName");
+            }
+        }
+
+        /// <summary>
+        /// 阅读页PDFViewer 对应的Content RegionName
+        /// </summary>
+        public static string ViwerRegionName
+        {
+            get
+            {
+                return GetRegionName("ViwerRegionName");
+            }
+        }
+
+        /// <summary>
+        /// BOTA内容项 对应的Content RegionName
+        /// </summary>
+        public static string BOTARegionName
+        {
+            get
+            {
+                return GetRegionName("BOTARegionName");
+            }
+        }
+
+        /// <summary>
+        /// 属性面板 对应的Content RegionName
+        /// </summary>
+        public static string PropertyRegionName
+        {
+            get
+            {
+                return GetRegionName("PropertyRegionName");
+            }
+        }
+
+        /// <summary>
+        /// 工具功能(页面编辑、水印、密文等)对应的Content RegionName
+        /// </summary>
+        public static string ToolContentRegionName
+        {
+            get
+            {
+                return GetRegionName("ToolContentRegionName");
+            }
+        }
+
+        /// <summary>
+        /// 工具菜单栏对应的Content RegionName
+        /// </summary>
+        public static string ToolsBarContentRegionName
+        {
+            get
+            {
+                return GetRegionName("ToolsBarContentRegionName");
+            }
+        }
+
+        /// <summary>
+        /// 底部工具栏对应的Content RegionName
+        /// </summary>
+        public static string BottomToolRegionName
+        {
+            get
+            {
+                return GetRegionName("BottomToolRegionName");
+            }
+        }
+
+        /// <summary>
+        /// 视图模块-分屏视图
+        /// </summary>
+        public static string SplitScreenViewRegionName
+        {
+            get
+            {
+                return GetRegionName("SplitScreenViewRegionName");
+            }
+        }
+
+        /// <summary>
+        /// 视图模块-主题颜色
+        /// </summary>
+        public static string ThemesContentName
+        {
+            get
+            {
+                return GetRegionName("ThemesContentName");
+            }
+        }
+
+        /// <summary>
+        /// 视图模块-阅读模式
+        /// </summary>
+        public static string ReadModeRegionName
+        {
+            get
+            {
+                return GetRegionName("ReadModeRegionName");
+            }
+        }
+
+        /// <summary>
+        /// 获取MainWindowsViewModel RegionNames字典里的RegionName,
+        /// 如果字典里没有键值就新建一个GUID,并插入到
+        /// </summary>
+        /// <returns></returns>
+        public static string GetRegionName(string key)
+        {
+            if (App.mainWindowViewModel.SelectedItem.RegionContentNames.ContainsKey(key))
+            {
+                return App.mainWindowViewModel.SelectedItem.RegionContentNames[key];
+            }
+            else
+            {
+                string name = Guid.NewGuid().ToString();
+                App.mainWindowViewModel.SelectedItem.RegionContentNames[key] = name;
+                return name;
+            }
+        }
+
+        /// <summary>
+        /// 如果不存在key,则插入key,并设置Value
+        /// 如果存在key,则更改Value
+        /// </summary>
+        public static void SetRegionName(string key, string Value)
+        {
+            if (App.mainWindowViewModel.SelectedItem.RegionContentNames.ContainsKey(key))
+            {
+                App.mainWindowViewModel.SelectedItem.RegionContentNames[key] = Value;
+            }
+            else
+            {
+                App.mainWindowViewModel.SelectedItem.RegionContentNames[key] = Value;
+            }
+        }
     }
-}
+}

+ 296 - 27
PDF Office/PDF Office.csproj

@@ -189,6 +189,12 @@
     <Compile Include="CustomControl\AlertsMessage.xaml.cs">
       <DependentUpon>AlertsMessage.xaml</DependentUpon>
     </Compile>
+    <Compile Include="CustomControl\ColorDropBox.xaml.cs">
+      <DependentUpon>ColorDropBox.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="CustomControl\ColorDropBoxPop.xaml.cs">
+      <DependentUpon>ColorDropBoxPop.xaml</DependentUpon>
+    </Compile>
     <Compile Include="CustomControl\CommonWritableComboBox.xaml.cs">
       <DependentUpon>CommonWritableComboBox.xaml</DependentUpon>
     </Compile>
@@ -215,17 +221,25 @@
       <DependentUpon>WritableComboBox.xaml</DependentUpon>
     </Compile>
     <Compile Include="DataConvert\FileFormatToIconConvert.cs" />
+    <Compile Include="DataConvert\FileToImageSourceConvert.cs" />
+    <Compile Include="DataConvert\InvertBoolConvert.cs" />
+    <Compile Include="DataConvert\ObjectConvert.cs" />
+    <Compile Include="DataConvert\PropertyPanelVisible.cs" />
+    <Compile Include="DataConvert\StringToVisibleConvert.cs" />
     <Compile Include="DataConvert\UnVisivleConvert.cs" />
     <Compile Include="EventAggregators\EditToolsEvent.cs" />
     <Compile Include="EventAggregators\PageEditNotifyEvent.cs" />
     <Compile Include="EventAggregators\PageEditRefreshEvent.cs" />
     <Compile Include="Helper\ConverterHelper.cs" />
     <Compile Include="Helper\EditToolsHelper.cs" />
+    <Compile Include="Helper\AdvancedInvokeCommandAction.cs" />
+    <Compile Include="Helper\ArrowHelper.cs" />
     <Compile Include="Helper\HomePageEditHelper.cs" />
     <Compile Include="Helper\ObservableDictionary.cs" />
     <Compile Include="Helper\PasswordBoxHelper.cs" />
-    <Compile Include="Helper\PictureConverter.cs" />
     <Compile Include="Helper\SDKLisenceHelper.cs" />
+    <Compile Include="Helper\PictureConverter.cs" />
+    <Compile Include="Helper\SetterAction.cs" />
     <Compile Include="Helper\SettingHelper.cs" />
     <Compile Include="Helper\ToolMethod.cs" />
     <Compile Include="Model\CloudDrive\CloudDriveItem.cs" />
@@ -269,6 +283,8 @@
     <Compile Include="Model\EditTools\Background\BackgroundTemplateListModel.cs" />
     <Compile Include="Model\EditTools\Watermark\WatermarkCreateModel.cs" />
     <Compile Include="Model\EditTools\Watermark\WatermarkTemplateListModel.cs" />
+    <Compile Include="Model\PageEdit\CustomInsertModel.cs" />
+    <Compile Include="Model\PageEdit\CustomPageItem.cs" />
     <Compile Include="Model\PageEdit\ExtractModel.cs" />
     <Compile Include="Model\PageEdit\PageEditItem.cs" />
     <Compile Include="Model\ParameterNames.cs" />
@@ -286,6 +302,10 @@
       <DesignTime>True</DesignTime>
       <AutoGen>True</AutoGen>
     </Compile>
+    <Compile Include="ViewModels\BOTA\BookmarkContentViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\BOTA\AddBookmarkDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\BOTA\BookmarkInfoDialogViewModel.cs" />
+    <Compile Include="ViewModels\EditTools\Background\BackgroundContentViewModel.cs" />
     <Compile Include="ViewModels\BOTA\BOTAContentViewModel.cs" />
     <Compile Include="ViewModels\BottomToolContentViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ConverterDialogs\ConverterProgressBarDialogViewModel.cs" />
@@ -302,7 +322,6 @@
     <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterExcelViewModel.cs" />
     <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterImgViewModel.cs" />
     <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageConverter\HomePageConverterWordViewModel.cs" />
-    <Compile Include="ViewModels\EditTools\Background\BackgroundContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Background\BackgroundCreateBaseContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Background\BackgroundCreateColorContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Background\BackgroundCreateFileContentViewModel.cs" />
@@ -310,6 +329,7 @@
     <Compile Include="ViewModels\EditTools\Background\BackgroundTemplateListBaseContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Background\BackgroundTemplateListColorContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Background\BackgroundTemplateListFileContentViewModel.cs" />
+    <Compile Include="ViewModels\HomePanel\RecentFiles\RecentFilesContentViewModel.cs" />
     <Compile Include="ViewModels\Tools\ConverterBarContentViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ExtractDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\FullScreenWindowViewModel.cs" />
@@ -333,6 +353,10 @@
     <Compile Include="ViewModels\Dialog\ToolsDialogs\SaftyDialogs\CheckPasswordDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ToolsDialogs\SaftyDialogs\SetPasswordDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\VerifyPassWordDialogViewModel.cs" />
+    <Compile Include="ViewModels\FillAndSign\FillAndSignContentViewModel.cs" />
+    <Compile Include="ViewModels\FillAndSign\PropertyPanel\DateFillPropertyViewModel.cs" />
+    <Compile Include="ViewModels\FillAndSign\PropertyPanel\ShapFillPropertyViewModel.cs" />
+    <Compile Include="ViewModels\FillAndSign\PropertyPanel\TextFillPropertyViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\CloudDrive\CloudDriveContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\CloudDrive\CloudDriveManager.cs" />
     <Compile Include="ViewModels\HomePanel\CloudDrive\CloudFilesContentViewModel.cs" />
@@ -348,6 +372,22 @@
     <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageExtractDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageInsertDialogViewModel.cs" />
     <Compile Include="ViewModels\PageEdit\PageEditContentViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\FreehandAnnotPropertyViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\FreetextAnnotPropertyViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\ImageAnnotPropertyViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\LinkAnnotPropertyViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\SharpsAnnotPropertyViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\StampAnnotPropertyViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\TextAnnotPropertyViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\TextEditPropertyViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\PropertyPanelContentViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\ViewModular\ReadModeContentViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\ViewModular\SplitScreenContentViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\ViewModular\ThemesContentViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\ViewModular\ViewModularContentViewModel.cs" />
+    <Compile Include="ViewModels\Tools\AnnotToolContentViewModel.cs" />
+    <Compile Include="ViewModels\Tools\AnnotToolContentViewModel.Function.cs" />
+    <Compile Include="ViewModels\Tools\AnnotToolContentViewModel.Properties.cs" />
     <Compile Include="ViewModels\Tools\ToolsBarContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Watermark\WatermarkContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Watermark\WatermarkCreateBaseContentViewModel.cs" />
@@ -356,6 +396,9 @@
     <Compile Include="ViewModels\EditTools\Watermark\WatermarkTemplateListBaseContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Watermark\WatermarkTemplateListFileContentViewModel.cs" />
     <Compile Include="ViewModels\EditTools\Watermark\WatermarkTemplateListTextContentViewModel.cs" />
+    <Compile Include="Views\BOTA\BookmarkContent.xaml.cs">
+      <DependentUpon>BookmarkContent.xaml</DependentUpon>
+    </Compile>
     <Compile Include="ViewModels\EditTools\Watermark\WatermarkDocumentContentViewModel.cs" />
     <Compile Include="Views\BOTA\BOTAContent.xaml.cs">
       <DependentUpon>BOTAContent.xaml</DependentUpon>
@@ -390,6 +433,12 @@
     <Compile Include="Views\Dialog\ConverterDialogs\ConverterWordDialog.xaml.cs">
       <DependentUpon>ConverterWordDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Dialog\BOTA\AddBookmarkDialog.xaml.cs">
+      <DependentUpon>AddBookmarkDialog.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\BOTA\BookmarkInfoDialog.xaml.cs">
+      <DependentUpon>BookmarkInfoDialog.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Dialog\FullScreenWindow.xaml.cs">
       <DependentUpon>FullScreenWindow.xaml</DependentUpon>
     </Compile>
@@ -450,7 +499,7 @@
     <Compile Include="Views\Dialog\PageEditDialogs\InsertDialog.xaml.cs">
       <DependentUpon>InsertDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\Dialog\ToolsDialogs\CompressDialogs\SplitDialog.xaml.cs">
+    <Compile Include="Views\Dialog\PageEditDialogs\SplitDialog.xaml.cs">
       <DependentUpon>SplitDialog.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialog.xaml.cs">
@@ -474,6 +523,21 @@
     <Compile Include="Views\Dialog\VerifyPassWordDialog.xaml.cs">
       <DependentUpon>VerifyPassWordDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\FillAndSign\FillAndSignContent.xaml.cs">
+      <DependentUpon>FillAndSignContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\FillAndSign\PropertyPanel\DateFillProperty.xaml.cs">
+      <DependentUpon>DateFillProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\FillAndSign\PropertyPanel\ShapFillProperty.xaml.cs">
+      <DependentUpon>ShapFillProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\FillAndSign\PropertyPanel\TextFillProperty.xaml.cs">
+      <DependentUpon>TextFillProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\HomePanel\CloudDrive\CloudDriveContent.xaml.cs">
+      <DependentUpon>CloudDriveContent.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\EditTools\Background\BackgroundContent.xaml.cs">
       <DependentUpon>BackgroundContent.xaml</DependentUpon>
     </Compile>
@@ -522,9 +586,6 @@
     <Compile Include="Views\EditTools\Background\BackgroundTemplateListFileContent.xaml.cs">
       <DependentUpon>BackgroundTemplateListFileContent.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\HomePanel\CloudDrive\CloudDriveContent.xaml.cs">
-      <DependentUpon>CloudDriveContent.xaml</DependentUpon>
-    </Compile>
     <Compile Include="Views\HomePanel\CloudDrive\CloudFilesContent.xaml.cs">
       <DependentUpon>CloudFilesContent.xaml</DependentUpon>
     </Compile>
@@ -540,7 +601,7 @@
     <Compile Include="Views\HomePanel\HomeToolsContent.xaml.cs">
       <DependentUpon>HomeToolsContent.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\HomePanel\PDFTools\PDFTools.cs" />
+    <Compile Include="Helper\PDFToolsHelper.cs" />
     <Compile Include="Views\HomePanel\PDFTools\PDFToolsContent.xaml.cs">
       <DependentUpon>PDFToolsContent.xaml</DependentUpon>
     </Compile>
@@ -556,8 +617,8 @@
     <Compile Include="Views\HomePanel\RecentFiles\DocItemListViewControl.xaml.cs">
       <DependentUpon>DocItemListViewControl.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\HomePanel\RecentFiles\RecentFilesView.xaml.cs">
-      <DependentUpon>RecentFilesView.xaml</DependentUpon>
+    <Compile Include="Views\HomePanel\RecentFiles\RecentFilesContent.xaml.cs">
+      <DependentUpon>RecentFilesContent.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\MainContent.xaml.cs">
       <DependentUpon>MainContent.xaml</DependentUpon>
@@ -565,6 +626,54 @@
     <Compile Include="Views\PageEdit\PageEditContent.xaml.cs">
       <DependentUpon>PageEditContent.xaml</DependentUpon>
     </Compile>
+    <Compile Include="CustomControl\CompositeControl\ColorContent.xaml.cs">
+      <DependentUpon>ColorContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="CustomControl\CompositeControl\SlidContentPop.xaml.cs">
+      <DependentUpon>SlidContentPop.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\AnnotPanel\FreehandAnnotProperty.xaml.cs">
+      <DependentUpon>FreehandAnnotProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\AnnotPanel\FreetextAnnotProperty.xaml.cs">
+      <DependentUpon>FreetextAnnotProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\AnnotPanel\ImageAnnotProperty.xaml.cs">
+      <DependentUpon>ImageAnnotProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\AnnotPanel\LinkAnnotProperty.xaml.cs">
+      <DependentUpon>LinkAnnotProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\AnnotPanel\SharpsAnnotProperty.xaml.cs">
+      <DependentUpon>SharpsAnnotProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\AnnotPanel\StampAnnotProperty.xaml.cs">
+      <DependentUpon>StampAnnotProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\AnnotPanel\TextAnnotProperty.xaml.cs">
+      <DependentUpon>TextAnnotProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\AnnotPanel\TextEditProperty.xaml.cs">
+      <DependentUpon>TextEditProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="CustomControl\CompositeControl\SlidContent.xaml.cs">
+      <DependentUpon>SlidContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\PropertyPanelContent.xaml.cs">
+      <DependentUpon>PropertyPanelContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\ViewModular\ReadModeContent.xaml.cs">
+      <DependentUpon>ReadModeContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\ViewModular\SplitScreenContent.xaml.cs">
+      <DependentUpon>SplitScreenContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\ViewModular\ThemesContent.xaml.cs">
+      <DependentUpon>ThemesContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\PropertyPanel\ViewModular\ViewModularContent.xaml.cs">
+      <DependentUpon>ViewModularContent.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Tools\AnnotToolContent.xaml.cs">
       <DependentUpon>AnnotToolContent.xaml</DependentUpon>
     </Compile>
@@ -581,9 +690,17 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="CustomControl\ColorDropBox.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="CustomControl\ColorDropBoxPop.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="CustomControl\CommonWritableComboBox.xaml">
+      <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
     </Page>
     <Page Include="CustomControl\LoadingControl.xaml">
       <SubType>Designer</SubType>
@@ -609,6 +726,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Styles\ButtonStyle.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Styles\CheckBoxStyle.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -617,6 +738,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Styles\ContainerStyles\ComboxStyle\ComboxItemStyle.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Styles\CustomBtnStyle.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -639,20 +764,44 @@
     </Page>
     <Page Include="Styles\MenuStyle.xaml">
       <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Styles\RadioButtonStyle.xaml">
+      <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Styles\SliderStyle.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
     </Page>
     <Page Include="Styles\TabControlStyle.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Styles\TextBoxStyle.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Styles\WindowsStyle.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Themes\Alias_Light.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Themes\Generic.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Themes\Global.xaml">
+      <SubType>Designer</SubType>
+      <Generator>XamlIntelliSenseFileGenerator</Generator>
+    </Page>
+    <Page Include="Views\BOTA\BookmarkContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\BOTA\BOTAContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -665,6 +814,18 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\Dialog\BOTA\AddBookmarkDialog.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\BOTA\BookmarkInfoDialog.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\Dialog\FullScreenWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Dialog\ConverterDialogs\ConverterExcelDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -697,11 +858,11 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\Dialog\FullScreenWindow.xaml">
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageBatchProcessingDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageBatchProcessingDialog.xaml">
+    <Page Include="Views\Dialog\PageEditDialogs\SplitDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -737,14 +898,42 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\FillAndSign\FillAndSignContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\FillAndSign\PropertyPanel\DateFillProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\FillAndSign\PropertyPanel\ShapFillProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\FillAndSign\PropertyPanel\TextFillProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\HomeContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Dialog\HomePageToolsDialogs\HomePageInsertDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\HomePanel\CloudDrive\CloudDriveContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePictureToPDFDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\HomePanel\CloudDrive\CloudFilesContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterModBookletContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -777,11 +966,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\Dialog\ToolsDialogs\CompressDialogs\SplitDialog.xaml">
-      <Generator>MSBuild:Compile</Generator>
+    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialog.xaml">
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialog.xaml">
+    <Page Include="CustomControl\CompositeControl\ColorContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -797,10 +985,22 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="CustomControl\CompositeControl\SlidContentPop.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Views\PropertyPanel\AnnotPanel\FreehandAnnotProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Dialog\ToolsDialogs\SaftyDialogs\DeleteSafetySettingsDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\PropertyPanel\AnnotPanel\FreetextAnnotProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\Dialog\ToolsDialogs\SaftyDialogs\SetPasswordDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -809,6 +1009,14 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\PropertyPanel\AnnotPanel\ImageAnnotProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\PropertyPanel\AnnotPanel\LinkAnnotProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\EditTools\Background\BackgroundContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -817,10 +1025,18 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\PropertyPanel\AnnotPanel\SharpsAnnotProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\EditTools\Watermark\WatermarkContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\PropertyPanel\AnnotPanel\StampAnnotProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\EditTools\Watermark\WatermarkCreateBaseContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -829,10 +1045,18 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\PropertyPanel\AnnotPanel\TextAnnotProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\EditTools\Watermark\WatermarkCreateTextContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\PropertyPanel\AnnotPanel\TextEditProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\EditTools\Watermark\WatermarkDocumentContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -841,49 +1065,59 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="CustomControl\CompositeControl\SlidContent.xaml">
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\EditTools\Watermark\WatermarkTemplateListFileContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
     <Page Include="Views\EditTools\Watermark\WatermarkTemplateListTextContent.xaml">
-      <SubType>Designer</SubType>
+      <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
     <Page Include="Views\EditTools\Background\BackgroundCreateBaseContent.xaml">
       <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Views\PropertyPanel\PropertyPanelContent.xaml">
+      <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\EditTools\Background\BackgroundCreateColorContent.xaml">
+    <Page Include="Views\PropertyPanel\ViewModular\ReadModeContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\EditTools\Background\BackgroundCreateFileContent.xaml">
+    <Page Include="Views\PropertyPanel\ViewModular\SplitScreenContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\EditTools\Background\BackgroundTemplateListBaseContent.xaml">
+    <Page Include="Views\EditTools\Background\BackgroundCreateColorContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\EditTools\Background\BackgroundTemplateListColorContent.xaml">
+    <Page Include="Views\EditTools\Background\BackgroundCreateFileContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\EditTools\Background\BackgroundTemplateListFileContent.xaml">
+    <Page Include="Views\PropertyPanel\ViewModular\ThemesContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\HomeContent.xaml">
+    <Page Include="Views\PropertyPanel\ViewModular\ViewModularContent.xaml">
+      <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\EditTools\Background\BackgroundTemplateListBaseContent.xaml">
       <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\HomePanel\CloudDrive\CloudDriveContent.xaml">
+    <Page Include="Views\EditTools\Background\BackgroundTemplateListColorContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\HomePanel\CloudDrive\CloudFilesContent.xaml">
+    <Page Include="Views\EditTools\Background\BackgroundTemplateListFileContent.xaml">
+      <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
     </Page>
     <Page Include="Views\HomePanel\HomeCloudContent.xaml">
       <SubType>Designer</SubType>
@@ -921,7 +1155,7 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\HomePanel\RecentFiles\RecentFilesView.xaml">
+    <Page Include="Views\HomePanel\RecentFiles\RecentFilesContent.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
@@ -986,6 +1220,39 @@
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     </None>
     <None Include="source\AnalysisWord\Res\word\_rels\document.xml.rels" />
+    <Resource Include="Resources\HomeIcon\PDFTools\background.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\batch-remove.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\batch.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\batesnumbers.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\compare.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\compress.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\convert.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\extract.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\form-filed-recognition.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\header&amp;footer.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\image.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\insert.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\merge.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\ocr.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\page-edit.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\pdf-to-excel.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\pdf-to-image.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\pdf-to-ppt.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\pdf-to-word.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\print.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\reduct.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\security.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\split.png" />
+    <Resource Include="Resources\HomeIcon\PDFTools\watermark.png" />
+    <Resource Include="Resources\PageEdit\GridLine.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Resource>
+    <Resource Include="Resources\PageEdit\HorizontalLine.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Resource>
+    <Resource Include="Resources\PageEdit\Staff.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Resource>
     <Content Include="source\AnalysisWord\Res\_rels\.rels">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
@@ -994,7 +1261,7 @@
     <None Include="App.config" />
   </ItemGroup>
   <ItemGroup>
-    <Folder Include="Views\FillAndSign\" />
+    <Folder Include="Views\Edit\" />
     <Folder Include="Views\Forms\" />
     <Folder Include="Views\Scan\" />
   </ItemGroup>
@@ -1110,6 +1377,8 @@
     <Content Include="source\AnalysisWord\Res\[Content_Types].xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <Resource Include="Resources\BOTA\empty_bookmark.png" />
+    <Resource Include="Resources\PropertyPanel\colorIcon.png" />
     <Content Include="SystemService\PreviewHandler.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

+ 10 - 10
PDF Office/Properties/Resources.Designer.cs

@@ -19,10 +19,10 @@ namespace PDF_Office.Properties {
     // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
     // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
     // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
+    public class Resources {
         
         private static global::System.Resources.ResourceManager resourceMan;
         
@@ -36,7 +36,7 @@ namespace PDF_Office.Properties {
         ///   返回此类使用的缓存的 ResourceManager 实例。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
+        public static global::System.Resources.ResourceManager ResourceManager {
             get {
                 if (object.ReferenceEquals(resourceMan, null)) {
                     global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PDF_Office.Properties.Resources", typeof(Resources).Assembly);
@@ -51,7 +51,7 @@ namespace PDF_Office.Properties {
         ///   使用此强类型资源类的所有资源查找执行重写。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
+        public static global::System.Globalization.CultureInfo Culture {
             get {
                 return resourceCulture;
             }
@@ -63,19 +63,19 @@ namespace PDF_Office.Properties {
         /// <summary>
         ///   查找类似 PDF Files (*.pdf)|*.pdf 的本地化字符串。
         /// </summary>
-        internal static string OpenDialogFilter {
+        public static string OpenDialogFilter {
             get {
                 return ResourceManager.GetString("OpenDialogFilter", resourceCulture);
             }
         }
         
         /// <summary>
-        ///   查找类似 &lt;xml version=&quot;1.0&quot; encoding = &quot;UTF-8&quot; stantdalone=&quot;yes&quot;&gt;
-        ///	&lt;Lisences
-        ///		devKey = &quot;tmqcblSkvVZeNj9k4nMA88G6g1kw4yYH+tPiqK+T91CaGM9urgNlT1+kXiTyv0W1bTQNObS51WgQpfJNl1inRVDKBB3wznw2o7vtKjOKKDNbV7R1ply0PhDKVkKYV040vpAdaT8GZEfllftNlts99uGhscqGvmCLBKmgTsq0HFo=&quot;
-        ///		devSecret=&quot;mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4iccr16WMBclnQACarlyblNMFa171moVHNuaoPG9eUt/RDYPB4dH12/mo6Nb7CMnoDUShGRobCLus9Vl3Sb80EZvGI/sVnm7Ju0Mhj+L/faMDDsKeheIw8v1IwmcZT3yU2l9MwkobWvR2DRybgSkLGYbFAv+VbVAICHE/17JjUpTkFo+FpaETldwAVsTVNm77oq2xRRte [字符串的其余部分被截断]&quot;; 的本地化字符串。
+        ///   查找类似 &lt;Lisences
+        ///	devKey = &quot;MR+QexuegNeqiBQsqcIcFzDeioHWjwb2vjDGnbooRo2BeTSWnmGnqHt8tHPlZxRRinYCeuW5DqGFyKcFfMVXAsip0AFj42LhYS9KBFus5kgXzOn+ZcLVFm1an4fKnn6ShRXnUWaemHBeaMzLbFEPbz6jDFFoIizuCMHP6KFf/6o=&quot;
+        ///	devSecret=&quot;mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4iYSXB8erGstkUyaynN7k8ocNCYAAzc9CPxiym2TlqeSUWpLOaOv47bs7x+UqfQzn9hrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBwyVLBY93oKLBB8UJg4t07605BGbaBKUlDopA0iGq1HSnkBnoGhqnvZdAqbtp5o0JTKDl1EzWv/F/0Gw7Q02pypAMFoEMtjKxkVmy+liLW9u9&quot;
+        ///	userKey = &quot;iBPRM/Tz8b6Z1G2GQt52X7hiNCGfVYXz [字符串的其余部分被截断]&quot;; 的本地化字符串。
         /// </summary>
-        internal static string SDKLisence {
+        public static string SDKLisence {
             get {
                 return ResourceManager.GetString("SDKLisence", resourceCulture);
             }

+ 44 - 0
PDF Office/Properties/Settings.Designer.cs

@@ -33,5 +33,49 @@ namespace PDF_Office.Properties {
                 this["RecentOpenFiles"] = value;
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public global::PDFSettings.DefaultAnnotProperties DefautAnnotProperties {
+            get {
+                return ((global::PDFSettings.DefaultAnnotProperties)(this["DefautAnnotProperties"]));
+            }
+            set {
+                this["DefautAnnotProperties"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public global::PDFSettings.APPSettingProperties AppProperties {
+            get {
+                return ((global::PDFSettings.APPSettingProperties)(this["AppProperties"]));
+            }
+            set {
+                this["AppProperties"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public global::PDFSettings.AllPDFToolsList AllPDFToolsList {
+            get {
+                return ((global::PDFSettings.AllPDFToolsList)(this["AllPDFToolsList"]));
+            }
+            set {
+                this["AllPDFToolsList"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public global::PDFSettings.QuickPDFToolsList QuickPDFToolsList {
+            get {
+                return ((global::PDFSettings.QuickPDFToolsList)(this["QuickPDFToolsList"]));
+            }
+            set {
+                this["QuickPDFToolsList"] = value;
+            }
+        }
     }
 }

+ 12 - 0
PDF Office/Properties/Settings.settings

@@ -5,5 +5,17 @@
     <Setting Name="RecentOpenFiles" Type="PDFSettings.Settings.RecentOpenFiles" Scope="User">
       <Value Profile="(Default)" />
     </Setting>
+    <Setting Name="DefautAnnotProperties" Type="PDFSettings.DefaultAnnotProperties" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="AppProperties" Type="PDFSettings.APPSettingProperties" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="AllPDFToolsList" Type="PDFSettings.AllPDFToolsList" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="QuickPDFToolsList" Type="PDFSettings.QuickPDFToolsList" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
   </Settings>
 </SettingsFile>

BIN
PDF Office/Resources/BOTA/empty_bookmark.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/background.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/batch-remove.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/batch.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/batesnumbers.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/compare.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/compress.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/convert.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/extract.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/form-filed-recognition.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/header&footer.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/image.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/insert.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/merge.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/ocr.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/page-edit.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/pdf-to-excel.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/pdf-to-image.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/pdf-to-ppt.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/pdf-to-word.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/print.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/reduct.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/security.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/split.png


BIN
PDF Office/Resources/HomeIcon/PDFTools/watermark.png


BIN
PDF Office/Resources/PageEdit/GridLine.png


BIN
PDF Office/Resources/PageEdit/HorizontalLine.png


BIN
PDF Office/Resources/PageEdit/Staff.png


BIN
PDF Office/Resources/PropertyPanel/colorIcon.png


BIN
PDF Office/Resources/PropertyPanel/propertybar_empty.png


+ 1 - 2
PDF Office/SDKLisence.xml

@@ -6,6 +6,5 @@
 	ConverterDevKey="Eahwo7OZAYHJaCF7TJQYKSVqC62MzfBdllVXnC5BRR5BQFDKnQ1FJtCRVdug+VNg/ti+/DeA5Sq4IH2CBpQjAZst5705uk5Sz0ZwRu8Qdn9HFGwh2pG6dJEIrl7lOccoZS6+1IxgOTcTeHqYpym3NsmtbhBWE848Pvme3scpW28="
 	ConverterDevSecret="mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4iccr16WMBclnQACarlyblNUvAm/S8uFbhXMvxwgBSgULSsrbuyF/SIZ3I+dl0qU8EiR4IKrcJxus3VRNu+jx8P7CGq2BlSjPVXRHBI1lV8ukpCIUGmcK+P+Z0QbYdkAHAm6NPgs2c4tp1jOFPPbnUkTtX7riDb9xRCx1YNm3/+xd96PzrVCcmtTizZP+elkr8="
 	ConverterUserkey=" WLUHzXhndQKyrTJVzvZ+dvPXDQDZeJpcSvklX3GJwRX4+urd8eQskYgbeCf0NXLZ/qJkS/k10x+qGad34i4v5rI/ASFIx901c/Nw5C0YJMH7X87dib141tdAmSmQhnKLO5TBi4FiAidboyvnLFLrYGMmS2kLQOXFPwPj5zQUv5A="
-	ConverterUserSecret="mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4iK16EcneqBPRe2eKQLuJXpA79IONX9GVI/Ap3uWzMcNWaitc2UB6gDeexJXFPVaXOFAoV6NtcUJC8skonXVk7k/oKTJGcYKLPGdXenrzHolQ=="
-	>
+	ConverterUserSecret="mG0c3O3Mzeu5dkZJW3gpqq9uA7o7EGQveSC38Q8TK4iK16EcneqBPRe2eKQLuJXpA79IONX9GVI/Ap3uWzMcNWaitc2UB6gDeexJXFPVaXOFAoV6NtcUJC8skonXVk7k/oKTJGcYKLPGdXenrzHolQ==">
 </Lisences>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 239 - 0
PDF Office/Styles/ButtonStyle.xaml


+ 151 - 14
PDF Office/Styles/CheckBoxStyle.xaml

@@ -1,31 +1,168 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <Style x:Key="OptionMarkFocusVisual">
+        <Setter Property="Control.Template">
+            <Setter.Value>
+                <ControlTemplate>
+                    <Rectangle
+                        Margin="14,0,0,0"
+                        SnapsToDevicePixels="true"
+                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
+                        StrokeDashArray="1 2"
+                        StrokeThickness="1" />
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+    <SolidColorBrush x:Key="OptionMark.Static.Background" Color="#FFFFFFFF" />
+    <SolidColorBrush x:Key="OptionMark.Static.Border" Color="#FF707070" />
+    <SolidColorBrush x:Key="OptionMark.MouseOver.Background" Color="White" />
+    <SolidColorBrush x:Key="OptionMark.MouseOver.Border" Color="Black" />
+    <SolidColorBrush x:Key="OptionMark.MouseOver.Glyph" Color="White" />
+    <SolidColorBrush x:Key="OptionMark.Disabled.Background" Color="#FFE6E6E6" />
+    <SolidColorBrush x:Key="OptionMark.Disabled.Border" Color="#FFBCBCBC" />
+    <SolidColorBrush x:Key="OptionMark.Disabled.Glyph" Color="#FF707070" />
+    <SolidColorBrush x:Key="OptionMark.Pressed.Background" Color="#FFD9ECFF" />
+    <SolidColorBrush x:Key="OptionMark.Pressed.Border" Color="#FF3C77DD" />
+    <SolidColorBrush x:Key="OptionMark.Pressed.Glyph" Color="White" />
+    <SolidColorBrush x:Key="OptionMark.Static.Glyph" Color="White" />
+    <ControlTemplate x:Key="MenuCheckbox" TargetType="{x:Type CheckBox}">
+        <Grid
+            x:Name="templateRoot"
+            Background="Transparent"
+            SnapsToDevicePixels="True">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="Auto" />
+                <ColumnDefinition Width="*" />
+            </Grid.ColumnDefinitions>
+            <Border
+                x:Name="checkBoxBorder"
+                Width="20"
+                Height="20"
+                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                BorderBrush="{TemplateBinding BorderBrush}"
+                BorderThickness="1">
+                <Grid x:Name="markGrid">
+                    <Polygon
+                        x:Name="optionMark"
+                        Width="20"
+                        Height="20"
+                        Margin="1,0,0,0"
+                        VerticalAlignment="Center"
+                        Fill="{StaticResource OptionMark.Static.Glyph}"
+                        Opacity="0"
+                        Points="15.5992424 4.59619408 16.3063492 5.30330086 5.69974747 15.9099026 0.396446609 10.6066017 1.10355339 9.89949494 5.7 14.496" />
+                    <Rectangle
+                        x:Name="indeterminateMark"
+                        Width="20"
+                        Height="20"
+                        Fill="{StaticResource OptionMark.Static.Glyph}"
+                        Opacity="0" />
+                </Grid>
+            </Border>
+            <ContentPresenter
+                x:Name="contentPresenter"
+                Grid.Column="1"
+                Margin="{TemplateBinding Padding}"
+                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                Focusable="False"
+                RecognizesAccessKey="True"
+                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+        </Grid>
+        <ControlTemplate.Triggers>
+            <Trigger Property="HasContent" Value="true">
+                <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" />
+                <Setter Property="Padding" Value="4,-1,0,0" />
+            </Trigger>
+            <Trigger Property="IsMouseOver" Value="true">
+                <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.MouseOver.Background}" />
+                <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.MouseOver.Border}" />
+                <Setter TargetName="checkBoxBorder" Property="BorderThickness" Value="2" />
+                <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.MouseOver.Glyph}" />
+                <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.MouseOver.Glyph}" />
+            </Trigger>
+            <Trigger Property="IsEnabled" Value="false">
+                <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Disabled.Background}" />
+                <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Disabled.Border}" />
+                <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Disabled.Glyph}" />
+                <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Disabled.Glyph}" />
+            </Trigger>
+            <Trigger Property="IsPressed" Value="true">
+                <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Pressed.Background}" />
+                <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Pressed.Border}" />
+                <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
+                <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
+            </Trigger>
+            <Trigger Property="IsChecked" Value="true">
+                <Setter TargetName="optionMark" Property="Opacity" Value="1" />
+                <Setter TargetName="indeterminateMark" Property="Opacity" Value="0" />
+                <Setter TargetName="checkBoxBorder" Property="Background" Value="#FF0078D7" />
+            </Trigger>
+            <Trigger Property="IsChecked" Value="{x:Null}">
+                <Setter TargetName="optionMark" Property="Opacity" Value="0" />
+                <Setter TargetName="indeterminateMark" Property="Opacity" Value="1" />
+            </Trigger>
+        </ControlTemplate.Triggers>
+    </ControlTemplate>
     <Style x:Key="CheckBoxStyle" TargetType="{x:Type CheckBox}">
         <Setter Property="SnapsToDevicePixels" Value="true" />
         <Setter Property="OverridesDefaultStyle" Value="False" />
-     
-        <Setter Property="Height" Value="22"/>
-        <Setter Property="IsChecked" Value="False"/>
+
+        <Setter Property="Height" Value="22" />
+        <Setter Property="IsChecked" Value="False" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="CheckBox">
                     <Grid>
                         <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="Auto"/>
-                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="Auto" />
+                            <ColumnDefinition Width="*" />
                         </Grid.ColumnDefinitions>
-                        <Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Height}">
-                            <Rectangle x:Name="CheckBoxRectangle" Fill="White" Opacity="0.3" RadiusY="2" RadiusX="2"/>
-                            <Rectangle x:Name="CheckBoxRectangleOut" Stroke="Black" StrokeThickness="1" RadiusY="2" RadiusX="1"/>
-                            <Grid x:Name="CheckedMark" Width="20" Height="20" Visibility="Collapsed">
-                                <Path SnapsToDevicePixels="False" StrokeThickness="2" Data="M3,11 L9,16" Stroke="White"/>
-                                <Path SnapsToDevicePixels="False" StrokeThickness="2" Data="M8,16 L17,5" Stroke="White"/>
+                        <Grid Width="{TemplateBinding Height}" Height="{TemplateBinding Height}">
+                            <Rectangle
+                                x:Name="CheckBoxRectangle"
+                                Fill="White"
+                                Opacity="0.3"
+                                RadiusX="2"
+                                RadiusY="2" />
+                            <Rectangle
+                                x:Name="CheckBoxRectangleOut"
+                                RadiusX="1"
+                                RadiusY="2"
+                                Stroke="Black"
+                                StrokeThickness="1" />
+                            <Grid
+                                x:Name="CheckedMark"
+                                Width="20"
+                                Height="20"
+                                Visibility="Collapsed">
+                                <Path
+                                    Data="M1,9 L10,17"
+                                    SnapsToDevicePixels="False"
+                                    Stroke="White"
+                                    StrokeThickness="3" />
+                                <Path
+                                    Data="M8,17 L20,4"
+                                    SnapsToDevicePixels="False"
+                                    Stroke="White"
+                                    StrokeThickness="3" />
                             </Grid>
                         </Grid>
-                        <TextBlock Grid.Column="1" FontSize="14" Foreground="Black" VerticalAlignment="Center" Margin="8,0,0,0" Text="{Binding Content,RelativeSource={RelativeSource TemplatedParent}}"/>
+                        <TextBlock
+                            Grid.Column="1"
+                            Margin="14,0,0,0"
+                            VerticalAlignment="Center"
+                            FontSize="18"
+                            Foreground="Black"
+                            Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
                     </Grid>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsChecked" Value="True">
+                            <Setter TargetName="CheckedMark" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="CheckBoxRectangle" Property="Fill" Value="#FF00A8E0" />
+                            <Setter TargetName="CheckBoxRectangle" Property="Opacity" Value="1" />
+                            <Setter TargetName="CheckBoxRectangleOut" Property="Stroke" Value="Transparent" />
                             <Setter TargetName="CheckedMark" Property="Visibility" Value="Visible"></Setter>
                             <Setter TargetName="CheckBoxRectangle" Property="Fill" Value="#000000"></Setter>
                             <Setter TargetName="CheckBoxRectangle" Property="Opacity" Value="1"></Setter>

+ 77 - 0
PDF Office/Styles/ContainerStyles/ComboxStyle/ComboxItemStyle.xaml

@@ -0,0 +1,77 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+    <ControlTemplate x:Key="comboxitem" TargetType="{x:Type ComboBoxItem}">
+        <Border
+            Name="Bd"
+            Padding="{TemplateBinding Control.Padding}"
+            Background="{TemplateBinding Panel.Background}"
+            BorderBrush="{TemplateBinding Border.BorderBrush}"
+            BorderThickness="{TemplateBinding Border.BorderThickness}"
+            SnapsToDevicePixels="True">
+            <ContentPresenter
+                HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
+                VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+                Content="{TemplateBinding ContentControl.Content}"
+                ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
+                ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
+                SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
+        </Border>
+        <ControlTemplate.Triggers>
+            <Trigger Property="UIElement.IsEnabled" Value="False">
+                <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+            </Trigger>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="Selector.IsSelected" Value="False" />
+                    <Condition Property="UIElement.IsMouseOver" Value="True" />
+                    <Condition Property="UIElement.IsKeyboardFocused" Value="False" />
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Bd" Property="Panel.Background" Value="#1F26A0DA" />
+                <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#A826A0DA" />
+            </MultiTrigger>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="Selector.IsSelected" Value="True" />
+                    <Condition Property="UIElement.IsMouseOver" Value="False" />
+                    <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Bd" Property="Panel.Background" Value="#3D26A0DA" />
+                <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#26A0DA" />
+            </MultiTrigger>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="Selector.IsSelected" Value="True" />
+                    <Condition Property="UIElement.IsMouseOver" Value="True" />
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Bd" Property="Panel.Background" Value="#1A477EDE" />
+                <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
+            </MultiTrigger>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="Selector.IsSelected" Value="True" />
+                    <Condition Property="UIElement.IsMouseOver" Value="False" />
+                    <Condition Property="UIElement.IsKeyboardFocused" Value="False" />
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Bd" Property="Panel.Background" Value="#3DDADADA" />
+                <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#DADADA" />
+            </MultiTrigger>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="Selector.IsSelected" Value="False" />
+                    <Condition Property="UIElement.IsMouseOver" Value="False" />
+                    <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#26A0DA" />
+            </MultiTrigger>
+            <MultiTrigger>
+                <MultiTrigger.Conditions>
+                    <Condition Property="Selector.IsSelected" Value="False" />
+                    <Condition Property="UIElement.IsMouseOver" Value="True" />
+                    <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
+                </MultiTrigger.Conditions>
+                <Setter TargetName="Bd" Property="Panel.Background" Value="#1A000000" />
+                <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A000000" />
+            </MultiTrigger>
+        </ControlTemplate.Triggers>
+    </ControlTemplate>
+</ResourceDictionary>

+ 276 - 112
PDF Office/Styles/CustomBtnStyle.xaml

@@ -1,113 +1,159 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                     xmlns:customControl ="clr-namespace:PDF_Office.CustomControl"
-                    >
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:customControl="clr-namespace:PDF_Office.CustomControl">
 
-    <SolidColorBrush x:Key="Common.Border" Color="#FF273C62"/>
-    <SolidColorBrush x:Key="Common.ForGround.Blue" Color="#FF273C62"/>
-    <SolidColorBrush x:Key="Common.ForGround.Black" Color="#FF000000"/>
-    <SolidColorBrush x:Key="Button.Static.Background" Color="#273C62"/>
-    <SolidColorBrush x:Key="Button.Static.Border" Color="#FF273C62"/>
-    <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#1A477EDE"/>
-    <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#273C62"/>
-    <SolidColorBrush x:Key="Button.Pressed.Background" Color="#29477EDE"/>
-    <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
-    <SolidColorBrush x:Key="Button.Disabled.Background" Color="#273C62"/>
-    <SolidColorBrush x:Key="Button.Disabled.Border" Color="#273C62"/>
-    <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#26FFFFFF"/>
-    <SolidColorBrush x:Key="CloseButton.MouseOver.Foreground" Color="Red"/>
+    <SolidColorBrush x:Key="Common.Border" Color="#FF273C62" />
+    <SolidColorBrush x:Key="Common.ForGround.Blue" Color="#FF273C62" />
+    <SolidColorBrush x:Key="Common.ForGround.Black" Color="#FF000000" />
+    <SolidColorBrush x:Key="Button.Static.Background" Color="#273C62" />
+    <SolidColorBrush x:Key="Button.Static.Border" Color="#FF273C62" />
+    <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#1A477EDE" />
+    <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#273C62" />
+    <SolidColorBrush x:Key="Button.Pressed.Background" Color="#29477EDE" />
+    <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B" />
+    <SolidColorBrush x:Key="Button.Disabled.Background" Color="#273C62" />
+    <SolidColorBrush x:Key="Button.Disabled.Border" Color="#273C62" />
+    <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#26FFFFFF" />
+    <SolidColorBrush x:Key="CloseButton.MouseOver.Foreground" Color="Red" />
     <SolidColorBrush x:Key="Disabled.ForeGround" Color="#FFE2E3E6" />
     <SolidColorBrush x:Key="BlueBtn.Mouseover.Background" Color="#31538D" />
     <SolidColorBrush x:Key="BlueBtn.Pressed.Background" Color="#1B2944" />
-    <SolidColorBrush x:Key="Redact.Background" Color="#477EDE"/>
+    <SolidColorBrush x:Key="Redact.Background" Color="#477EDE" />
 
-    <Style x:Key="ToggleBtnViewModeStyle"  TargetType="customControl:CustomIconToggleBtn">
-        <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
-        <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
-        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="Height" Value="40"/>
-        <Setter Property="Margin" Value="4,0,4,0"/>
+    <Style x:Key="ToggleBtnViewModeStyle" TargetType="customControl:CustomIconToggleBtn">
+        <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
+        <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="Height" Value="40" />
+        <Setter Property="Margin" Value="4,0,4,0" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
-                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
-                        <Grid >
-                            <Grid  Width="40" Height="40" VerticalAlignment="Center" HorizontalAlignment="Center">
-                                <Image x:Name="ImageIcon" Width="20" Height="20" Source="{Binding Icon,RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="Collapsed"/>
+                    <Border
+                        x:Name="border"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        SnapsToDevicePixels="true">
+                        <Grid>
+                            <Grid
+                                Width="40"
+                                Height="40"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center">
+                                <Image
+                                    x:Name="ImageIcon"
+                                    Width="20"
+                                    Height="20"
+                                    Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
+                                    Visibility="Collapsed" />
                             </Grid>
-                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                            <ContentPresenter
+                                x:Name="contentPresenter"
+                                Margin="{TemplateBinding Padding}"
+                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                Focusable="False"
+                                RecognizesAccessKey="True"
+                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                         </Grid>
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
-                        </Trigger>
-                        <Trigger Property="IsEnabled" Value="false">
-                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
-                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
-                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
                         </Trigger>
+                        <!--<Trigger Property="IsEnabled" Value="false">
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
+                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
+                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
+                        </Trigger>-->
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
         <Style.Triggers>
             <Trigger Property="IsChecked" Value="True">
-                <Setter Property="Background" Value="{StaticResource Button.Pressed.Background}"></Setter>
+                <Setter Property="Background" Value="{StaticResource Button.Pressed.Background}" />
             </Trigger>
             <Trigger Property="IsChecked" Value="False">
-                <Setter Property="Background" Value="Transparent"></Setter>
+                <Setter Property="Background" Value="Transparent" />
             </Trigger>
             <Trigger Property="IsChecked" Value="{x:Null}">
-                <Setter Property="Background" Value="Transparent"></Setter>
+                <Setter Property="Background" Value="Transparent" />
             </Trigger>
         </Style.Triggers>
     </Style>
 
-    <SolidColorBrush x:Key="Button.Select.Background" Color="#1770F4" Opacity="0.1"/>
-    <SolidColorBrush x:Key="Button.SelectForeground.Background" Color="#1770F4"/>
+    <SolidColorBrush
+        x:Key="Button.Select.Background"
+        Opacity="0.1"
+        Color="#1770F4" />
+    <SolidColorBrush x:Key="Button.SelectForeground.Background" Color="#1770F4" />
 
-    <Style x:Key="ToggleBtnSelectStyle"  TargetType="customControl:CustomIconToggleBtn">
-        <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
-        <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
-        <Setter Property="Foreground" Value="#8F96A7"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="Height" Value="40"/>
-        <Setter Property="Margin" Value="4,0,4,0"/>
+    <Style x:Key="ToggleBtnSelectStyle" TargetType="customControl:CustomIconToggleBtn">
+        <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
+        <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
+        <Setter Property="Foreground" Value="#8F96A7" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="Height" Value="40" />
+        <Setter Property="Margin" Value="4,0,4,0" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
-                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="4" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
-                        <Grid >
-                            <Grid  Width="40" Height="40" VerticalAlignment="Center" HorizontalAlignment="Center">
-                                <Image x:Name="ImageIcon" Width="20" Height="20" Source="{Binding Icon,RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="Collapsed"/>
+                    <Border
+                        x:Name="border"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        CornerRadius="4"
+                        SnapsToDevicePixels="true">
+                        <Grid>
+                            <Grid
+                                Width="40"
+                                Height="40"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center">
+                                <Image
+                                    x:Name="ImageIcon"
+                                    Width="20"
+                                    Height="20"
+                                    Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
+                                    Visibility="Collapsed" />
                             </Grid>
-                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                            <ContentPresenter
+                                x:Name="contentPresenter"
+                                Margin="{TemplateBinding Padding}"
+                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                Focusable="False"
+                                RecognizesAccessKey="True"
+                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                         </Grid>
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
-                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
-                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
-                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
+                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
+                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
@@ -115,39 +161,52 @@
         </Setter>
         <Style.Triggers>
             <Trigger Property="IsChecked" Value="True">
-                <Setter Property="Background" Value="{StaticResource Button.Select.Background}"></Setter>
-                <Setter Property="Foreground"  Value="{StaticResource Button.SelectForeground.Background}"></Setter>
+                <Setter Property="Background" Value="{StaticResource Button.Select.Background}" />
+                <Setter Property="Foreground" Value="{StaticResource Button.SelectForeground.Background}" />
             </Trigger>
             <Trigger Property="IsChecked" Value="False">
-                <Setter Property="Background" Value="Transparent"></Setter>
+                <Setter Property="Background" Value="Transparent" />
             </Trigger>
             <Trigger Property="IsChecked" Value="{x:Null}">
-                <Setter Property="Background" Value="Transparent"></Setter>
+                <Setter Property="Background" Value="Transparent" />
             </Trigger>
         </Style.Triggers>
     </Style>
 
 
     <Style x:Key="BlueBtnStyle" TargetType="{x:Type Button}">
-        <Setter Property="Background" Value="#1460F3"/>
+        <Setter Property="Background" Value="#1460F3" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
-                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="4" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
-                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                    <Border
+                        x:Name="border"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        CornerRadius="4"
+                        SnapsToDevicePixels="true">
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="{StaticResource BlueBtn.Mouseover.Background}"/>
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource BlueBtn.Mouseover.Background}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="{StaticResource BlueBtn.Pressed.Background}"/>
+                            <Setter TargetName="border" Property="Background" Value="{StaticResource BlueBtn.Pressed.Background}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
-                            <Setter Property="Background" TargetName="border" Value="#33000000"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
-                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF999999"/>
-                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
+                            <Setter TargetName="border" Property="Background" Value="#33000000" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
+                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
+                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
@@ -156,65 +215,170 @@
     </Style>
 
     <Style x:Key="InsideBarBtnStyle" TargetType="{x:Type Button}">
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="BorderBrush" Value="Transparent"/>
-        <Setter Property="Width" Value="auto"/>
-        <Setter Property="Height" Value="40"/>
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="BorderBrush" Value="Transparent" />
+        <Setter Property="Width" Value="auto" />
+        <Setter Property="Height" Value="40" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
-                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,0,0" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
-                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
-                        
+                    <Border
+                        x:Name="border"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="0,0,0,0"
+                        SnapsToDevicePixels="true">
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="#1A000000"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
+                            <Setter TargetName="border" Property="Background" Value="#1A000000" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="gray" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="#26000000"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
+                            <Setter TargetName="border" Property="Background" Value="#26000000" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="gray" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
-                            <Setter Property="Background" TargetName="border" Value="Transparent"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value="#33000000"/>
-                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF999999"/>
-                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.4"/>
+                            <Setter TargetName="border" Property="Background" Value="Transparent" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="#33000000" />
+                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
+                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    
+
     <Style x:Key="CompressBtn" TargetType="Button">
-        <Setter Property="Background" Value="White"/>
-        <Setter Property="BorderBrush" Value="White"/>
-        <Setter Property="Width" Value="528"/>
-        <Setter Property="Height" Value="64"/>
-        <Setter Property="HorizontalAlignment" Value="Center"/>
-        
+        <Setter Property="Background" Value="White" />
+        <Setter Property="BorderBrush" Value="White" />
+        <Setter Property="Width" Value="528" />
+        <Setter Property="Height" Value="64" />
+        <Setter Property="HorizontalAlignment" Value="Center" />
+
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
-                    <Border x:Name="border" BorderBrush="Black" BorderThickness="1,1,1,1" Background="{TemplateBinding Background}" SnapsToDevicePixels="true" CornerRadius="7,7,7,7">
-                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                    <Border
+                        x:Name="border"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="Black"
+                        BorderThickness="1,1,1,1"
+                        CornerRadius="7,7,7,7"
+                        SnapsToDevicePixels="true">
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="#1A000000"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
+                            <Setter TargetName="border" Property="Background" Value="#1A000000" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="gray" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="#26000000"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
+                            <Setter TargetName="border" Property="Background" Value="#26000000" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="gray" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
-                            <Setter Property="Background" TargetName="border" Value="Transparent"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value="#33000000"/>
-                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF999999"/>
-                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.4"/>
+                            <Setter TargetName="border" Property="Background" Value="Transparent" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="#33000000" />
+                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
+                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <SolidColorBrush x:Key="RadioButton.MouseOver.Background" Color="#1A000000" />
+    <SolidColorBrush x:Key="RadioButton.MouseOver.Border" Color="#FF5593FF" />
+    <SolidColorBrush x:Key="RadioButton.MouseOver.Glyph" Color="#FFF3F9FF" />
+    <SolidColorBrush x:Key="RadioButton.Disabled.Background" Color="#00000000" />
+    <SolidColorBrush x:Key="RadioButton.Disabled.Border" Color="#FFBCBCBC" />
+    <SolidColorBrush x:Key="RadioButton.Disabled.Glyph" Color="#FF707070" />
+    <SolidColorBrush x:Key="RadioButton.Pressed.Background" Color="#26000000" />
+    <SolidColorBrush x:Key="RadioButton.Pressed.Border" Color="#FF3C77DD" />
+    <SolidColorBrush x:Key="RadioButton.Pressed.Glyph" Color="#1A477EDE" />
+    <SolidColorBrush x:Key="RadioButton.Static.Glyph" Color="#FF212121" />
+    <SolidColorBrush x:Key="RadioButton.Static.Background" Color="#FFFFFFFF" />
+    <SolidColorBrush x:Key="RadioButton.Static.Border" Color="#FF707070" />
+    <!--  自定义形状的单选按钮  -->
+    <Style x:Key="RectangleRadionButton" TargetType="{x:Type RadioButton}">
+        <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" />
+        <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" />
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Width" Value="72" />
+        <Setter Property="Height" Value="80" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RadioButton}">
+                    <Grid
+                        x:Name="templateRoot"
+                        Background="Transparent"
+                        SnapsToDevicePixels="True">
+                        <Border
+                            x:Name="radioButtonBorder"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Background="{TemplateBinding Background}"
+                            BorderBrush="{TemplateBinding BorderBrush}"
+                            BorderThickness="{TemplateBinding BorderThickness}">
+                            <Rectangle
+                                x:Name="optionMark"
+                                Width="{TemplateBinding Width}"
+                                Height="{TemplateBinding Height}"
+                                Opacity="0" />
+                        </Border>
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                    </Grid>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsMouseOver" Value="true">
+                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="true">
+                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="true">
+                            <Setter TargetName="optionMark" Property="Opacity" Value="1" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="{x:Null}">
+                            <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>

+ 8 - 4
PDF Office/Styles/ListBoxStyle.xaml

@@ -27,16 +27,20 @@
                     <Condition Property="Selector.IsSelectionActive" Value="False" />
                     <Condition Property="IsSelected" Value="True" />
                 </MultiTrigger.Conditions>
-                --><!--<Setter TargetName="Bd" Property="Background" Value="#1A477EDE" />
-                <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />--><!--
+            -->
+            <!--<Setter TargetName="Bd" Property="Background" Value="#1A477EDE" />
+                <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />-->
+            <!--
             </MultiTrigger>
             <MultiTrigger>
                 <MultiTrigger.Conditions>
                     <Condition Property="Selector.IsSelectionActive" Value="True" />
                     <Condition Property="IsSelected" Value="True" />
                 </MultiTrigger.Conditions>
-                --><!--<Setter TargetName="Bd" Property="Background" Value="#1A477EDE" />
-                <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />--><!--
+            -->
+            <!--<Setter TargetName="Bd" Property="Background" Value="#1A477EDE" />
+                <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />-->
+            <!--
             </MultiTrigger>
             <Trigger Property="IsEnabled" Value="False">
                 <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />

+ 80 - 28
PDF Office/Styles/ListViewStyle.xaml

@@ -1,4 +1,7 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:i="http://schemas.microsoft.com/xaml/behaviors">
 
     <Style x:Key="FilesListViewStyle" TargetType="{x:Type ListView}">
         <Setter Property="Template">
@@ -16,7 +19,6 @@
                                 <Grid.RowDefinitions>
                                     <RowDefinition Height="Auto" />
                                     <RowDefinition />
-
                                 </Grid.RowDefinitions>
                                 <Grid>
                                     <Grid.ColumnDefinitions>
@@ -25,12 +27,13 @@
                                         <ColumnDefinition Width="2*" />
                                         <ColumnDefinition Width="100" />
                                     </Grid.ColumnDefinitions>
+                                    <!--以下是列表模式的列标题-->
                                     <TextBlock
                                         Margin="12,0,0,6"
                                         HorizontalAlignment="Left"
                                         VerticalAlignment="Center"
                                         FontSize="14" />
-                                    <!--  Text="{x:Static homePageUI:HomePage.RencentFiles_Name}"  -->
+
                                     <TextBlock
                                         Grid.Column="1"
                                         Margin="0,0,0,6"
@@ -39,17 +42,16 @@
                                         FontSize="14"
                                         TextAlignment="Center"
                                         TextWrapping="Wrap" />
-                                    <!--  Text="{x:Static homePageUI:HomePage.RencentFiles_LastOpenedTime}"  -->
                                     <TextBlock
                                         Grid.Column="2"
                                         Margin="0,0,0,6"
                                         HorizontalAlignment="Center"
                                         VerticalAlignment="Center"
                                         FontSize="14" />
-                                    <!--  Text="{x:Static homePageUI:HomePage.RencentFiles_Size}"  -->
+                                    <!--列表模式的列标题的分隔线-->
                                     <Rectangle
                                         Grid.ColumnSpan="4"
-                                        Height="1"
+                                        Height="0"
                                         Margin="12,0,0,0"
                                         HorizontalAlignment="Stretch"
                                         VerticalAlignment="Bottom"
@@ -66,17 +68,6 @@
 
     <Style x:Key="FilesListViewItemStyle" TargetType="{x:Type ListViewItem}">
         <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
-        <!--<Setter Property="Control.Padding" Value="4,1" />
-        <Setter Property="Control.HorizontalContentAlignment">
-            <Setter.Value>
-                <Binding Path="HorizontalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
-            </Setter.Value>
-        </Setter>
-        <Setter Property="Control.VerticalContentAlignment">
-            <Setter.Value>
-                <Binding Path="VerticalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
-            </Setter.Value>
-        </Setter>-->
         <Setter Property="Panel.Background" Value="#00FFFFFF" />
         <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
         <Setter Property="Border.BorderThickness" Value="1" />
@@ -145,8 +136,8 @@
                                 ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
                                 ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                                 SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
+                            <Rectangle Grid.Column="1" Height="1" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Fill="#C5CBD3"/>
                         </Grid>
-
                     </Border>
                     <ControlTemplate.Triggers>
                         <MultiTrigger>
@@ -183,19 +174,18 @@
         </Setter>
     </Style>
 
-
     <Style x:Key="FilesGridItemStyle" TargetType="{x:Type ListViewItem}">
         <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
         <!--<Setter Property="Control.Padding" Value="4,1" />
         <Setter Property="Control.HorizontalContentAlignment">
-            <Setter.Value>
-                <Binding Path="HorizontalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
-            </Setter.Value>
+        <Setter.Value>
+        <Binding Path="HorizontalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
+        </Setter.Value>
         </Setter>
         <Setter Property="Control.VerticalContentAlignment">
-            <Setter.Value>
-                <Binding Path="VerticalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
-            </Setter.Value>
+        <Setter.Value>
+        <Binding Path="VerticalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
+        </Setter.Value>
         </Setter>-->
         <Setter Property="Panel.Background" Value="#00FFFFFF" />
         <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
@@ -257,7 +247,6 @@
                                     Fill="#FFE2E3E6" />
                             </Grid>
                         </Grid>
-
                     </Border>
                     <ControlTemplate.Triggers>
                         <MultiTrigger>
@@ -293,7 +282,6 @@
                         <Trigger Property="UIElement.IsEnabled" Value="False">
                             <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                         </Trigger>
-
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
@@ -330,11 +318,75 @@
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="ListViewItem">
-                    <ContentControl HorizontalContentAlignment="Stretch" Width="{TemplateBinding Width}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
+                    <ContentControl
+                        Width="{TemplateBinding Width}"
+                        HorizontalContentAlignment="Stretch"
+                        Content="{TemplateBinding Content}"
+                        ContentTemplate="{TemplateBinding ContentTemplate}" />
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
 
+    <Style x:Key="ListViewItemGraySelectStyle" TargetType="{x:Type ListViewItem}">
+        <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
+        <Setter Property="Panel.Background" Value="#F2F2F2" />
+        <Setter Property="Border.BorderBrush" Value="#F2F2F2" />
+        <Setter Property="Control.Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type ListViewItem}">
+                    <Border
+                        Name="Bd"
+                        Background="{TemplateBinding Panel.Background}"
+                        BorderBrush="{TemplateBinding Border.BorderBrush}"
+                        SnapsToDevicePixels="True">
+                        <ContentPresenter
+                            Margin="0"
+                            HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+                            Content="{TemplateBinding ContentControl.Content}"
+                            ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
+                            ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
+                            SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="UIElement.IsMouseOver" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Panel.Background" Value="#d9d9d9" />
+                            <Setter Property="Border.BorderBrush" Value="#d9d9d9" />
+                        </MultiTrigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="UIElement.IsMouseOver" Value="False" />
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Panel.Background" Value="#F2F2F2" />
+                            <Setter Property="Border.BorderBrush" Value="#F2F2F2" />
+                        </MultiTrigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="Selector.IsSelectionActive" Value="False" />
+                                <Condition Property="Selector.IsSelected" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Panel.Background" Value="#97D7FB" />
+                            <Setter Property="Border.BorderBrush" Value="#97D7FB" />
+                        </MultiTrigger>
 
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="Selector.IsSelectionActive" Value="True" />
+                                <Condition Property="Selector.IsSelected" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Panel.Background" Value="#97D7FB" />
+                            <Setter Property="Border.BorderBrush" Value="#97D7FB" />
+                        </MultiTrigger>
+                        <!--<Trigger Property="UIElement.IsEnabled" Value="False">
+                        <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+                        </Trigger>-->
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
 </ResourceDictionary>

+ 262 - 0
PDF Office/Styles/RadioButtonStyle.xaml

@@ -0,0 +1,262 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <Style x:Key="OptionMarkFocusVisual">
+        <Setter Property="Control.Template">
+            <Setter.Value>
+                <ControlTemplate>
+                    <Rectangle
+                        Margin="14,0,0,0"
+                        SnapsToDevicePixels="true"
+                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
+                        StrokeDashArray="1 2"
+                        StrokeThickness="1" />
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+    <Style x:Key="FocusVisual">
+        <Setter Property="Control.Template">
+            <Setter.Value>
+                <ControlTemplate>
+                    <Rectangle
+                        Margin="2"
+                        SnapsToDevicePixels="true"
+                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
+                        StrokeDashArray="1 2"
+                        StrokeThickness="1" />
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <SolidColorBrush x:Key="RadioButton.Static.Background" Color="#FFFFFFFF" />
+    <SolidColorBrush x:Key="RadioButton.Static.Border" Color="#FF707070" />
+
+    <SolidColorBrush x:Key="RadioButton.MouseOver.Background" Color="#1A000000" />
+    <SolidColorBrush x:Key="RadioButton.MouseOver.Border" Color="#FF5593FF" />
+    <SolidColorBrush x:Key="RadioButton.MouseOver.Glyph" Color="#FFF3F9FF" />
+    <SolidColorBrush x:Key="RadioButton.Disabled.Background" Color="#00000000" />
+    <SolidColorBrush x:Key="RadioButton.Disabled.Border" Color="#FFBCBCBC" />
+    <SolidColorBrush x:Key="RadioButton.Disabled.Glyph" Color="#FF707070" />
+    <SolidColorBrush x:Key="RadioButton.Pressed.Background" Color="#26000000" />
+    <SolidColorBrush x:Key="RadioButton.Pressed.Border" Color="#FF3C77DD" />
+    <SolidColorBrush x:Key="RadioButton.Pressed.Glyph" Color="#1A477EDE" />
+    <SolidColorBrush x:Key="RadioButton.Static.Glyph" Color="#FF212121" />
+    <!--  填充颜色  -->
+    <SolidColorBrush x:Key="Separator.fill" Color="#1A000000" />
+    <SolidColorBrush x:Key="MenuIco.fill" Color="#000000" />
+    <Style x:Key="PageViewRadioBtn" TargetType="{x:Type RadioButton}">
+        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
+        <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" />
+        <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" />
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Width" Value="60" />
+        <Setter Property="Height" Value="80" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RadioButton}">
+                    <Grid
+                        x:Name="templateRoot"
+                        Background="Transparent"
+                        SnapsToDevicePixels="True">
+                        <Border
+                            x:Name="radioButtonBorder"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Background="{TemplateBinding Background}"
+                            BorderBrush="{TemplateBinding BorderBrush}"
+                            BorderThickness="{TemplateBinding BorderThickness}">
+                            <Rectangle
+                                x:Name="optionMark"
+                                Width="{TemplateBinding Width}"
+                                Height="{TemplateBinding Height}"
+                                Opacity="0" />
+                        </Border>
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                    </Grid>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="HasContent" Value="true">
+                            <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" />
+                            <Setter Property="Padding" Value="4,-1,0,0" />
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="true">
+                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="true">
+                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="true">
+                            <Setter TargetName="optionMark" Property="Opacity" Value="1" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="{x:Null}">
+                            <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+    <Style x:Key="SplitModeViewRadioBtn" TargetType="{x:Type RadioButton}">
+        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
+        <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" />
+        <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" />
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Width" Value="78" />
+        <Setter Property="Height" Value="80" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RadioButton}">
+                    <Grid
+                        x:Name="templateRoot"
+                        Background="Transparent"
+                        SnapsToDevicePixels="True">
+                        <Border
+                            x:Name="radioButtonBorder"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Background="{TemplateBinding Background}"
+                            BorderBrush="{TemplateBinding BorderBrush}"
+                            BorderThickness="{TemplateBinding BorderThickness}">
+                            <Rectangle
+                                x:Name="optionMark"
+                                Width="{TemplateBinding Width}"
+                                Height="{TemplateBinding Height}"
+                                Opacity="0" />
+                        </Border>
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                    </Grid>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="HasContent" Value="true">
+                            <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" />
+                            <Setter Property="Padding" Value="4,-1,0,0" />
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="true">
+                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="true">
+                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="true">
+                            <Setter TargetName="optionMark" Property="Opacity" Value="1" />
+                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="{x:Null}">
+                            <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <!--最近列表列表模式单选按钮-->
+    <Style x:Key="ListModeRadioBtnStyle" TargetType="{x:Type RadioButton}">
+        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
+        <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}"/>
+        <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}"/>
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RadioButton}">
+                    <Border CornerRadius="4" x:Name="root" Background="#EEF2F3">
+                   
+                        <Grid x:Name="templateRoot" SnapsToDevicePixels="True" VerticalAlignment="Center" HorizontalAlignment="Center">
+
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="Auto"/>
+                                <ColumnDefinition Width="*"/>
+                            </Grid.ColumnDefinitions>
+                            <Border x:Name="radioButtonBorder" Visibility="Collapsed" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="100" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,1,2,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
+                                <Grid x:Name="markGrid" Margin="2">
+                                    <Ellipse x:Name="optionMark" Fill="{StaticResource RadioButton.Static.Glyph}" MinWidth="6" MinHeight="6" Opacity="0"/>
+                                </Grid>
+                            </Border>
+
+                            <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
+                            </ContentPresenter>
+                        </Grid>
+
+                    </Border>
+
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="HasContent" Value="true">
+                            <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>
+                            <Setter Property="Padding" Value="4,-1,0,0"/>
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="true">
+                            <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.MouseOver.Background}"/>
+                            <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.MouseOver.Border}"/>
+                            <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.MouseOver.Glyph}"/>
+                        </Trigger>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Disabled.Background}"/>
+                            <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Disabled.Border}"/>
+                            <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.Disabled.Glyph}"/>
+                            <Setter Property="Border.Background" TargetName="root">
+                                <Setter.Value>
+                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
+                                        <GradientStop Color="White" Offset="0.0" />
+                                        <GradientStop Color="#CFCFCF" Offset="0.5" />
+                                        <GradientStop Color="White" Offset="0.0" />
+                                    </LinearGradientBrush>
+                                </Setter.Value>
+                            </Setter>
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="true">
+                            <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Background}"/>
+                            <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Border}"/>
+                            <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.Pressed.Glyph}"/>
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="true">
+                            <Setter Property="Opacity" TargetName="optionMark" Value="1"/>
+                            <Setter Property="Border.Background" TargetName="root" Value="White">
+                              
+                            </Setter>
+                        </Trigger>
+                        <Trigger Property="IsChecked" Value="{x:Null}">
+                            <Setter Property="Opacity" TargetName="optionMark" Value="0.56"/>
+
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+</ResourceDictionary>

+ 652 - 0
PDF Office/Styles/SliderStyle.xaml

@@ -0,0 +1,652 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <Style TargetType="{x:Type Slider}" x:Key="RoundThumbSlider"
+       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+       xmlns:s="clr-namespace:System;assembly=mscorlib">
+        <Style.Triggers>
+            <Trigger Property="Slider.Orientation"
+                 Value="Vertical">
+                <Setter Property="Control.Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type Slider}">
+                            <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
+                                BorderBrush="{TemplateBinding Border.BorderBrush}"
+                                Background="{TemplateBinding Panel.Background}"
+                                Name="border"
+                                SnapsToDevicePixels="True">
+                                <Grid>
+                                    <Grid.ColumnDefinitions>
+                                        <ColumnDefinition Width="Auto" />
+                                        <ColumnDefinition Width="Auto"
+                                                      MinWidth="{TemplateBinding FrameworkElement.MinWidth}" />
+                                        <ColumnDefinition Width="Auto" />
+                                    </Grid.ColumnDefinitions>
+                                    <TickBar Fill="{TemplateBinding TextElement.Foreground}"
+                                         Placement="Left"
+                                         Name="TopTick"
+                                         Width="4"
+                                         Margin="0,0,2,0"
+                                         Visibility="Collapsed"
+                                         Grid.Column="0" />
+                                    <TickBar Fill="{TemplateBinding TextElement.Foreground}"
+                                         Placement="Right"
+                                         Name="BottomTick"
+                                         Width="4"
+                                         Margin="2,0,0,0"
+                                         Visibility="Collapsed"
+                                         Grid.Column="2" />
+                                    <Border BorderThickness="1"
+                                        BorderBrush="#D6D6D6"
+                                        Background="#E7EAEA"
+                                        Name="TrackBackground"
+                                        Width="4"
+                                        Margin="0,5"
+                                        HorizontalAlignment="Center"
+                                        Grid.Column="1">
+                                        <Canvas Margin="-1,-6">
+                                            <Rectangle Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
+                                                   Name="PART_SelectionRange"
+                                                   Width="4"
+                                                   Visibility="Hidden" />
+                                        </Canvas>
+                                    </Border>
+                                    <Track Name="PART_Track"
+                                       Grid.Column="1">
+                                        <Track.DecreaseRepeatButton>
+                                            <RepeatButton>
+                                                <RepeatButton.Command>
+                                                    <RoutedCommand />
+                                                </RepeatButton.Command>
+                                                <RepeatButton.Style>
+                                                    <Style TargetType="{x:Type RepeatButton}">
+                                                        <Setter Property="FrameworkElement.OverridesDefaultStyle"
+                                                            Value="True" />
+                                                        <Setter Property="Panel.Background"
+                                                            Value="#00FFFFFF" />
+                                                        <Setter Property="UIElement.Focusable"
+                                                            Value="False" />
+                                                        <Setter Property="KeyboardNavigation.IsTabStop"
+                                                            Value="False" />
+                                                        <Setter Property="Control.Template">
+                                                            <Setter.Value>
+                                                                <ControlTemplate TargetType="{x:Type RepeatButton}">
+                                                                    <Rectangle Fill="{TemplateBinding Panel.Background}"
+                                                                           Width="{TemplateBinding FrameworkElement.Width}"
+                                                                           Height="2" />
+                                                                </ControlTemplate>
+                                                            </Setter.Value>
+                                                        </Setter>
+                                                    </Style>
+                                                </RepeatButton.Style>
+                                            </RepeatButton>
+                                        </Track.DecreaseRepeatButton>
+                                        <Track.Thumb>
+                                            <Thumb OverridesDefaultStyle="True"
+                                               Name="Thumb"
+                                               Width="18"
+                                               Height="11"
+                                               VerticalAlignment="Top"
+                                               Focusable="False">
+                                                <Thumb.Template>
+                                                    <ControlTemplate TargetType="{x:Type Thumb}">
+                                                        <Grid UseLayoutRounding="True"
+                                                          HorizontalAlignment="Center"
+                                                          VerticalAlignment="Center">
+                                                            <Path
+                                              Stretch="Fill"
+                                              Fill="#477EDE"
+                                              Stroke="#477EDE"
+                                              StrokeThickness="1"
+                                              UseLayoutRounding="True"
+                                              Name="grip"
+                                              VerticalAlignment="Center"
+                                              SnapsToDevicePixels="True" >
+                                                                <Path.Data>
+                                                                    <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
+                                                                </Path.Data>
+                                                            </Path>
+                                                        </Grid>
+                                                        <ControlTemplate.Triggers>
+                                                            <Trigger Property="UIElement.IsMouseOver"
+                                                                 Value="True">
+                                                                <Setter Property="Shape.Fill"
+                                                                    TargetName="grip"
+                                                                    Value="#477EDE" />
+                                                                <Setter Property="Shape.Stroke"
+                                                                    TargetName="grip"
+                                                                    Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="Thumb.IsDragging"
+                                                                 Value="True">
+                                                                <Setter Property="Shape.Fill"
+                                                                    TargetName="grip"
+                                                                    Value="#477EDE" />
+                                                                <Setter Property="Shape.Stroke"
+                                                                    TargetName="grip"
+                                                                    Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="UIElement.IsEnabled"
+                                                                 Value="False">
+                                                                <Setter Property="Shape.Fill"
+                                                                    TargetName="grip"
+                                                                    Value="#477EDE" />
+                                                                <Setter Property="Shape.Stroke"
+                                                                    TargetName="grip"
+                                                                    Value="#477EDE" />
+                                                            </Trigger>
+                                                        </ControlTemplate.Triggers>
+                                                    </ControlTemplate>
+                                                </Thumb.Template>
+                                            </Thumb>
+                                        </Track.Thumb>
+                                        <Track.IncreaseRepeatButton>
+                                            <RepeatButton>
+                                                <RepeatButton.Command>
+                                                    <RoutedCommand />
+                                                </RepeatButton.Command>
+                                                <RepeatButton.Style>
+                                                    <Style TargetType="{x:Type RepeatButton}">
+                                                        <Setter Property="FrameworkElement.OverridesDefaultStyle"
+                                                            Value="True" />
+                                                        <Setter Property="Panel.Background"
+                                                            Value="#00FFFFFF" />
+                                                        <Setter Property="UIElement.Focusable"
+                                                            Value="False" />
+                                                        <Setter Property="KeyboardNavigation.IsTabStop"
+                                                            Value="False" />
+                                                        <Setter Property="Control.Template">
+                                                            <Setter.Value>
+                                                                <ControlTemplate TargetType="{x:Type RepeatButton}">
+                                                                    <Rectangle Fill="{TemplateBinding Panel.Background}"
+                                                                           Width="{TemplateBinding FrameworkElement.Width}"
+                                                                           Height="2" />
+                                                                </ControlTemplate>
+                                                            </Setter.Value>
+                                                        </Setter>
+                                                    </Style>
+                                                </RepeatButton.Style>
+                                            </RepeatButton>
+                                        </Track.IncreaseRepeatButton>
+                                    </Track>
+                                </Grid>
+                            </Border>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="Slider.TickPlacement"
+                                     Value="TopLeft">
+                                    <Setter Property="UIElement.Visibility"
+                                        TargetName="TopTick"
+                                        Value="Visible" />
+                                    <Setter Property="Control.Template"
+                                        TargetName="Thumb">
+                                        <Setter.Value>
+                                            <ControlTemplate TargetType="{x:Type Thumb}">
+                                                <Grid UseLayoutRounding="True"
+                                                  HorizontalAlignment="Center"
+                                                  VerticalAlignment="Center">
+                                                    <Path
+                                              Stretch="Fill"
+                                              Fill="#477EDE"
+                                              Stroke="#477EDE"
+                                              StrokeThickness="1"
+                                              UseLayoutRounding="True"
+                                              Name="grip"
+                                              VerticalAlignment="Center"
+                                              SnapsToDevicePixels="True" >
+                                                        <Path.Data>
+                                                            <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
+                                                        </Path.Data>
+                                                    </Path>
+                                                </Grid>
+                                                <ControlTemplate.Triggers>
+                                                    <Trigger Property="UIElement.IsMouseOver"
+                                                         Value="True">
+                                                        <Setter Property="Shape.Fill"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                        <Setter Property="Shape.Stroke"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="Thumb.IsDragging"
+                                                         Value="True">
+                                                        <Setter Property="Shape.Fill"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                        <Setter Property="Shape.Stroke"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="UIElement.IsEnabled"
+                                                         Value="False">
+                                                        <Setter Property="Shape.Fill"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                        <Setter Property="Shape.Stroke"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                    </Trigger>
+                                                </ControlTemplate.Triggers>
+                                            </ControlTemplate>
+                                        </Setter.Value>
+                                    </Setter>
+                                    <Setter Property="FrameworkElement.Margin"
+                                        TargetName="TrackBackground"
+                                        Value="2,5,0,5" />
+                                </Trigger>
+                                <Trigger Property="Slider.TickPlacement"
+                                     Value="BottomRight">
+                                    <Setter Property="UIElement.Visibility"
+                                        TargetName="BottomTick"
+                                        Value="Visible" />
+                                    <Setter Property="Control.Template"
+                                        TargetName="Thumb">
+                                        <Setter.Value>
+                                            <ControlTemplate TargetType="{x:Type Thumb}">
+                                                <Grid UseLayoutRounding="True"
+                                                  HorizontalAlignment="Center"
+                                                  VerticalAlignment="Center">
+                                                    <Path
+                                              Stretch="Fill"
+                                              Fill="#477EDE"
+                                              Stroke="#477EDE"
+                                              StrokeThickness="1"
+                                              UseLayoutRounding="True"
+                                              Name="grip"
+                                              VerticalAlignment="Center"
+                                              SnapsToDevicePixels="True" >
+                                                        <Path.Data>
+                                                            <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
+                                                        </Path.Data>
+                                                    </Path>
+                                                </Grid>
+                                                <ControlTemplate.Triggers>
+                                                    <Trigger Property="UIElement.IsMouseOver"
+                                                         Value="True">
+                                                        <Setter Property="Shape.Fill"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                        <Setter Property="Shape.Stroke"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="Thumb.IsDragging"
+                                                         Value="True">
+                                                        <Setter Property="Shape.Fill"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                        <Setter Property="Shape.Stroke"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="UIElement.IsEnabled"
+                                                         Value="False">
+                                                        <Setter Property="Shape.Fill"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                        <Setter Property="Shape.Stroke"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                    </Trigger>
+                                                </ControlTemplate.Triggers>
+                                            </ControlTemplate>
+                                        </Setter.Value>
+                                    </Setter>
+                                    <Setter Property="FrameworkElement.Margin"
+                                        TargetName="TrackBackground"
+                                        Value="0,5,2,5" />
+                                </Trigger>
+                                <Trigger Property="Slider.TickPlacement"
+                                     Value="Both">
+                                    <Setter Property="UIElement.Visibility"
+                                        TargetName="TopTick"
+                                        Value="Visible" />
+                                    <Setter Property="UIElement.Visibility"
+                                        TargetName="BottomTick"
+                                        Value="Visible" />
+                                </Trigger>
+                                <Trigger Property="Slider.IsSelectionRangeEnabled"
+                                     Value="True">
+                                    <Setter Property="UIElement.Visibility"
+                                        TargetName="PART_SelectionRange"
+                                        Value="Visible" />
+                                </Trigger>
+                                <Trigger Property="UIElement.IsKeyboardFocused"
+                                     Value="True">
+                                    <Setter Property="TextElement.Foreground"
+                                        TargetName="Thumb"
+                                        Value="#0000FF" />
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Trigger>
+        </Style.Triggers>
+        <Setter Property="Stylus.IsPressAndHoldEnabled"
+            Value="False" />
+        <Setter Property="Panel.Background"
+            Value="#00FFFFFF" />
+        <Setter Property="Border.BorderBrush"
+            Value="#00FFFFFF" />
+        <Setter Property="TextElement.Foreground"
+            Value="#E5E5E5" />
+        <Setter Property="Control.Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type Slider}">
+                    <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
+                        BorderBrush="{TemplateBinding Border.BorderBrush}"
+                        Background="{TemplateBinding Panel.Background}"
+                        Name="border"
+                        SnapsToDevicePixels="True">
+                        <Grid>
+                            <Grid.RowDefinitions>
+                                <RowDefinition Height="Auto" />
+                                <RowDefinition Height="Auto"
+                                           MinHeight="{TemplateBinding FrameworkElement.MinHeight}" />
+                                <RowDefinition Height="Auto" />
+                            </Grid.RowDefinitions>
+                            <TickBar Fill="{TemplateBinding TextElement.Foreground}"
+                                 Placement="Top"
+                                 Name="TopTick"
+                                 Height="4"
+                                 Margin="0,2,0,0"
+                                 Visibility="Collapsed"
+                                 Grid.Row="0" />
+                            <TickBar Fill="{TemplateBinding TextElement.Foreground}"
+                                 Placement="Bottom"
+                                 Name="BottomTick"
+                                 Height="4"
+                                 Margin="0,0,0,2"
+                                 Visibility="Collapsed"
+                                 Grid.Row="2" />
+                            <Border BorderThickness="0"
+                                BorderBrush="#D6D6D6"
+                                Background="#FFE2E3E6"
+                                Name="TrackBackground"
+                                Height="4"
+                                Margin="5,0"
+                                VerticalAlignment="Center"
+                                Grid.Row="1">
+                                <Canvas Margin="-6,-1">
+                                    <Rectangle Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
+                                           Name="PART_SelectionRange"
+                                           Height="4"
+                                           Visibility="Hidden" />
+                                </Canvas>
+                            </Border>
+                            <Track Name="PART_Track"
+                               Grid.Row="1">
+                                <Track.DecreaseRepeatButton>
+                                    <RepeatButton>
+                                        <RepeatButton.Command>
+                                            <RoutedCommand />
+                                        </RepeatButton.Command>
+                                        <RepeatButton.Style>
+                                            <Style TargetType="{x:Type RepeatButton}">
+                                                <Setter Property="FrameworkElement.OverridesDefaultStyle"
+                                                    Value="True" />
+                                                <Setter Property="Panel.Background"
+                                                    Value="#00FFFFFF" />
+                                                <Setter Property="UIElement.Focusable"
+                                                    Value="False" />
+                                                <Setter Property="KeyboardNavigation.IsTabStop"
+                                                    Value="False" />
+                                                <Setter Property="Control.Template">
+                                                    <Setter.Value>
+                                                        <ControlTemplate TargetType="{x:Type RepeatButton}">
+                                                            <Rectangle Fill="{TemplateBinding Panel.Background}"
+                                                                   Width="{TemplateBinding FrameworkElement.Width}"
+                                                                   Height="{TemplateBinding FrameworkElement.Height}" />
+                                                        </ControlTemplate>
+                                                    </Setter.Value>
+                                                </Setter>
+                                            </Style>
+                                        </RepeatButton.Style>
+                                    </RepeatButton>
+                                </Track.DecreaseRepeatButton>
+                                <Track.Thumb>
+                                    <Thumb OverridesDefaultStyle="True"
+                                       Name="Thumb"
+                                       Width="8"
+                                       Height="16"
+                                       VerticalAlignment="Center"
+                                       Focusable="False">
+                                        <Thumb.Template>
+                                            <ControlTemplate TargetType="{x:Type Thumb}">
+                                                <Grid UseLayoutRounding="True"
+                                                  HorizontalAlignment="Center"
+                                                  VerticalAlignment="Center">
+                                                    <Path
+                                              Stretch="Fill"
+                                              Fill="#477EDE"
+                                              Stroke="#477EDE"
+                                              StrokeThickness="1"
+                                              UseLayoutRounding="True"
+                                              Name="grip"
+                                              VerticalAlignment="Center"
+                                              SnapsToDevicePixels="True" >
+                                                        <Path.Data>
+                                                            <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
+                                                        </Path.Data>
+                                                    </Path>
+                                                </Grid>
+                                                <ControlTemplate.Triggers>
+                                                    <Trigger Property="UIElement.IsMouseOver"
+                                                         Value="True">
+                                                        <Setter Property="Shape.Fill"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                        <Setter Property="Shape.Stroke"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="Thumb.IsDragging"
+                                                         Value="True">
+                                                        <Setter Property="Shape.Fill"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                        <Setter Property="Shape.Stroke"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="UIElement.IsEnabled"
+                                                         Value="False">
+                                                        <Setter Property="Shape.Fill"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                        <Setter Property="Shape.Stroke"
+                                                            TargetName="grip"
+                                                            Value="#477EDE" />
+                                                    </Trigger>
+                                                </ControlTemplate.Triggers>
+                                            </ControlTemplate>
+                                        </Thumb.Template>
+                                    </Thumb>
+                                </Track.Thumb>
+                                <Track.IncreaseRepeatButton>
+                                    <RepeatButton>
+                                        <RepeatButton.Command>
+                                            <RoutedCommand />
+                                        </RepeatButton.Command>
+                                        <RepeatButton.Style>
+                                            <Style TargetType="{x:Type RepeatButton}">
+                                                <Setter Property="FrameworkElement.OverridesDefaultStyle"
+                                                    Value="True" />
+                                                <Setter Property="Panel.Background"
+                                                    Value="#00FFFFFF" />
+                                                <Setter Property="UIElement.Focusable"
+                                                    Value="False" />
+                                                <Setter Property="KeyboardNavigation.IsTabStop"
+                                                    Value="False" />
+                                                <Setter Property="Control.Template">
+                                                    <Setter.Value>
+                                                        <ControlTemplate TargetType="{x:Type RepeatButton}">
+                                                            <Rectangle Fill="{TemplateBinding Panel.Background}"
+                                                                   Width="{TemplateBinding FrameworkElement.Width}"
+                                                                   Height="{TemplateBinding FrameworkElement.Height}"
+                                                                   />
+                                                        </ControlTemplate>
+                                                    </Setter.Value>
+                                                </Setter>
+                                            </Style>
+                                        </RepeatButton.Style>
+                                    </RepeatButton>
+                                </Track.IncreaseRepeatButton>
+                            </Track>
+                        </Grid>
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="Slider.TickPlacement"
+                             Value="TopLeft">
+                            <Setter Property="UIElement.Visibility"
+                                TargetName="TopTick"
+                                Value="Visible" />
+                            <Setter Property="Control.Template"
+                                TargetName="Thumb">
+                                <Setter.Value>
+                                    <ControlTemplate TargetType="{x:Type Thumb}">
+                                        <Grid UseLayoutRounding="True"
+                                          HorizontalAlignment="Center"
+                                          VerticalAlignment="Center">
+                                            <Path
+                                              Stretch="Fill"
+                                              Fill="#477EDE"
+                                              Stroke="#477EDE"
+                                              StrokeThickness="1"
+                                              UseLayoutRounding="True"
+                                              Name="grip"
+                                              VerticalAlignment="Center"
+                                              SnapsToDevicePixels="True" >
+                                                <Path.Data>
+                                                    <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
+                                                </Path.Data>
+                                            </Path>
+                                        </Grid>
+                                        <ControlTemplate.Triggers>
+                                            <Trigger Property="UIElement.IsMouseOver"
+                                                 Value="True">
+                                                <Setter Property="Shape.Fill"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                                <Setter Property="Shape.Stroke"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                            </Trigger>
+                                            <Trigger Property="Thumb.IsDragging"
+                                                 Value="True">
+                                                <Setter Property="Shape.Fill"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                                <Setter Property="Shape.Stroke"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                            </Trigger>
+                                            <Trigger Property="UIElement.IsEnabled"
+                                                 Value="False">
+                                                <Setter Property="Shape.Fill"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                                <Setter Property="Shape.Stroke"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                            </Trigger>
+                                        </ControlTemplate.Triggers>
+                                    </ControlTemplate>
+                                </Setter.Value>
+                            </Setter>
+                            <Setter Property="FrameworkElement.Margin"
+                                TargetName="TrackBackground"
+                                Value="5,2,5,0" />
+                        </Trigger>
+                        <Trigger Property="Slider.TickPlacement"
+                             Value="BottomRight">
+                            <Setter Property="UIElement.Visibility"
+                                TargetName="BottomTick"
+                                Value="Visible" />
+                            <Setter Property="Control.Template"
+                                TargetName="Thumb">
+                                <Setter.Value>
+                                    <ControlTemplate TargetType="{x:Type Thumb}">
+                                        <Grid UseLayoutRounding="True"
+                                          HorizontalAlignment="Center"
+                                          VerticalAlignment="Center">
+                                            <Path
+                                              Stretch="Fill"
+                                              Fill="#477EDE"
+                                              Stroke="#477EDE"
+                                              StrokeThickness="1"
+                                              UseLayoutRounding="True"
+                                              Name="grip"
+                                              VerticalAlignment="Center"
+                                              SnapsToDevicePixels="True" >
+                                                <Path.Data>
+                                                    <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
+                                                </Path.Data>
+                                            </Path>
+                                        </Grid>
+                                        <ControlTemplate.Triggers>
+                                            <Trigger Property="UIElement.IsMouseOver"
+                                                 Value="True">
+                                                <Setter Property="Shape.Fill"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                                <Setter Property="Shape.Stroke"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                            </Trigger>
+                                            <Trigger Property="Thumb.IsDragging"
+                                                 Value="True">
+                                                <Setter Property="Shape.Fill"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                                <Setter Property="Shape.Stroke"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                            </Trigger>
+                                            <Trigger Property="UIElement.IsEnabled"
+                                                 Value="False">
+                                                <Setter Property="Shape.Fill"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                                <Setter Property="Shape.Stroke"
+                                                    TargetName="grip"
+                                                    Value="#477EDE" />
+                                            </Trigger>
+                                        </ControlTemplate.Triggers>
+                                    </ControlTemplate>
+                                </Setter.Value>
+                            </Setter>
+                            <Setter Property="FrameworkElement.Margin"
+                                TargetName="TrackBackground"
+                                Value="5,0,5,2" />
+                        </Trigger>
+                        <Trigger Property="Slider.TickPlacement"
+                             Value="Both">
+                            <Setter Property="UIElement.Visibility"
+                                TargetName="TopTick"
+                                Value="Visible" />
+                            <Setter Property="UIElement.Visibility"
+                                TargetName="BottomTick"
+                                Value="Visible" />
+                        </Trigger>
+                        <Trigger Property="Slider.IsSelectionRangeEnabled"
+                             Value="True">
+                            <Setter Property="UIElement.Visibility"
+                                TargetName="PART_SelectionRange"
+                                Value="Visible" />
+                        </Trigger>
+                        <Trigger Property="UIElement.IsKeyboardFocused"
+                             Value="True">
+                            <Setter Property="TextElement.Foreground"
+                                TargetName="Thumb"
+                                Value="#0000FF" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Setter Property="SelectionStart" Value="{Binding Minimum, RelativeSource={RelativeSource Self}}" />
+        <Setter Property="SelectionEnd" Value="{Binding Value, RelativeSource={RelativeSource Self}}" />
+    </Style>
+</ResourceDictionary>

+ 16 - 0
PDF Office/Styles/TextBoxStyle.xaml

@@ -0,0 +1,16 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+    <Style x:Key="PagesView_txtContext" TargetType="{x:Type TextBlock}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontSize" Value="12" />
+    </Style>
+    <Style x:Key="ViewMode_txtContext" TargetType="{x:Type TextBlock}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontSize" Value="11" />
+    </Style>
+    <Style x:Key="PagesView_titleContext" TargetType="{x:Type TextBlock}">
+        <Setter Property="FontFamily" Value=" Segoe UI Semibold" />
+        <Setter Property="FontWeight" Value="SemiBold" />
+        <Setter Property="FontSize" Value="14" />
+    </Style>
+</ResourceDictionary>

+ 0 - 28
PDF Office/Styles/ToolsBtnStyle.xaml

@@ -1,28 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <Style x:Key="ToolsBtnStyle" TargetType="{x:Type Button}">
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="BorderBrush" Value="Transparent"/>
-        <Setter Property="Width" Value="auto"/>
-        <Setter Property="Height" Value="40"/>
-        <Setter Property="Template">
-            <Setter.Value>
-                <ControlTemplate TargetType="{x:Type Button}">
-                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"   Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
-                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
-                    </Border>
-                    <ControlTemplate.Triggers>
-                        <Trigger Property="IsMouseOver" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="#1A000000"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
-                        </Trigger>
-                        <Trigger Property="IsPressed" Value="true">
-                            <Setter Property="Background" TargetName="border" Value="#26000000"/>
-                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
-                        </Trigger>
-                    </ControlTemplate.Triggers>
-                </ControlTemplate>
-            </Setter.Value>
-        </Setter>
-    </Style>
-</ResourceDictionary>

+ 0 - 22
PDF Office/Styles/ToolsMenuStyle.xaml

@@ -1,22 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <Style x:Key="ToolsMenuStyle" TargetType="{x:Type MenuItem}">
-        <Setter Property="Background" Value="White"></Setter>
-        <Setter Property="Margin" Value="0,0,0,0"></Setter>
-        <Setter Property="Padding" Value="0,10,10,20"></Setter>
-            <Setter Property="Template">
-            <Setter.Value>
-                <ControlTemplate TargetType="{x:Type MenuItem}">
-                    <Border Padding="17,0,17,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
-                        <ContentPresenter x:Name="ContentPresenter"  Content="{TemplateBinding Header}" Grid.Column="1" ContentSource="Header" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
-                    </Border>
-                    <ControlTemplate.Triggers>
-                        <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="Background" Value="whitesmoke"/>
-                        </Trigger>
-                    </ControlTemplate.Triggers>
-                </ControlTemplate>
-            </Setter.Value>
-        </Setter>
-    </Style>
-</ResourceDictionary>

+ 243 - 0
PDF Office/Themes/Alias_Light.xaml

@@ -0,0 +1,243 @@
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:sys="clr-namespace:System;assembly=mscorlib">
+    <!--  对应组件库Token的Alias(别名)文件  -->
+    <sys:Double x:Key="spacing.base.element.0">0</sys:Double>
+    <sys:Double x:Key="spacing.base.element.1">1</sys:Double>
+    <sys:Double x:Key="spacing.base.element.2">2</sys:Double>
+    <sys:Double x:Key="spacing.base.element.4">4</sys:Double>
+    <sys:Double x:Key="spacing.base.element.6">6</sys:Double>
+    <sys:Double x:Key="spacing.base.element.8">8</sys:Double>
+    <sys:Double x:Key="spacing.base.element.12">12</sys:Double>
+    <sys:Double x:Key="spacing.base.element.16">16</sys:Double>
+    <sys:Double x:Key="spacing.base.module.24">24</sys:Double>
+    <sys:Double x:Key="spacing.base.module.32">32</sys:Double>
+    <sys:Double x:Key="spacing.tree.32">32</sys:Double>
+    <sys:Double x:Key="spacing.tree.40">40</sys:Double>
+    <sys:Double x:Key="spacing.tree.56">56</sys:Double>
+    <sys:Double x:Key="spacing.tree.64">64</sys:Double>
+    <sys:Double x:Key="spacing.tree.80">80</sys:Double>
+    <sys:Double x:Key="spacing.tree.88">88</sys:Double>
+    <SolidColorBrush x:Key="color.sys.text.anti.norm">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.anti.dis">#F7F8FA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.accent.norm">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.accent.hov">#3f8ff6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.accent.act">#0e53ca</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.accent.dis">#92C6FB</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.neutral.lv1">#252629</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.neutral.lv2">#616469</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.neutral.lv3">#94989C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.neutral.dis">#B1B3B8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.brand.norm">#273C62</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.brand.hov">#415A81</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.brand.act">#1C305D</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.brand.dis">#88A1C0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.text.error.norm">#F3465B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.border.error">#F3465B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.border.neutral.lv1">#CED0D4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.border.neutral.lv2">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.border.neutral.lv3">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.border.accent.lv1">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.border.accent.lv2">#68acf8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.bg.home">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.bg.view">#CED0D4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.bg.tabbar">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.mg">#F7F8FA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.fg.light">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.fg.light-dis">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.fg.dark">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.dark.bg">#36383B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.state.note">#E8F5FF</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.state.info">#BDDFFD</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.state.error">#FDC7C6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.state.warning">#FFF1C1</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.anti">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.accent">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.sys.layout.brand">#273C62</SolidColorBrush>
+    <SolidColorBrush
+        x:Key="color.sys.layout.divider"
+        Opacity=" 0.1"
+        Color="#000000" />
+    <SolidColorBrush x:Key="color.btn.cta.bg.norm">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.cta.bg.hov">#3f8ff6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.cta.bg.act">#0e53ca</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.cta.bg.dis">#92C6FB</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.cta.text.def">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.cta.text.dis">#F7F8FA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.brand.bg.norm">#273C62</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.brand.bg.hov">#415A81</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.brand.bg.act">#1C305D</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.brand.bg.dis">#88A1C0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.brand.text.def">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.brand.text.dis">#F7F8FA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.sec.border-color">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.sec.bg.norm">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.sec.bg.hov">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.sec.bg.act">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.sec.bg.dis">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.sec.text.def">#252629</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.sec.text.dis">#B1B3B8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.icon-fill.bg.norm">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.icon-fill.bg.hov">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.icon-fill.bg.act">#CED0D4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.icon-fill.bg.dis">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.ghost.border.norm">#273C62</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.ghost.border.hov">#415A81</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.ghost.border.act">#1C305D</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.ghost.border.dis">#88A1C0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.ghost.text.norm">#273C62</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.ghost.text.hov">#415A81</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.ghost.text.act">#1C305D</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.ghost.text.dis">#88A1C0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.link.text.norm">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.link.text.hov">#3f8ff6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.link.text.act">#0e53ca</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.link.text.dis">#92C6FB</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.upgrade.bg.norm">#FF852E</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.upgrade.bg.hov">#FFA153</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.upgrade.bg.act">#D2621C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.upgrade.bg.dis">#FFD09E</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.upgrade.text.def">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.btn.upgrade.text.dis">#F7F8FA</SolidColorBrush>
+    <SolidColorBrush
+        x:Key="color.item-state.sel.bg.lv1"
+        Opacity="0.1"
+        Color="#1770F4" />
+    <SolidColorBrush x:Key="color.item-state.sel.bg.lv2">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush
+        x:Key="color.item-state.sel.bg.lv3"
+        Opacity=" 0.6"
+        Color="#CED0D4" />
+    <SolidColorBrush x:Key="color.item-state.sel.border.lv3">#CED0D4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.item-state.hov.bg">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.border.norm">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.border.hov">#68acf8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.border.focus">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.border.dis">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.border.error">#F3465B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.border.sel">#92C6FB</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.bg.def">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.bg.dis">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.bg-text.sel">#92C6FB</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.text.act">#252629</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.text.placeholder">#94989C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.text.dis">#B1B3B8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.text.tips">#94989C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.field.text.tips-error">#F3465B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.slider.track.norm">#CED0D4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.slider.track.dis">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.slider.track-filled.norm">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.slider.track-filled.dis">#B1B3B8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.slider.knob.norm">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.slider.knob.dis">#B1B3B8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.slider.knob.border">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.neutral.norm.lv1">#616469</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.neutral.norm.lv2">#94989C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.neutral.norm.lv3">#CED0D4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.neutral.sel">#252629</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.neutral.dis">#B1B3B8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.brand">#273C62</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.accent">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.state.info">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.state.success">#1AD598</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.state.warning">#FFAF25</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.state.error">#F3465B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.anti.norm">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.base.anti.dis">#F7F8FA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.pdf-tools.pink">#F859C8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.pdf-tools.cyan">#37D4CF</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.pdf-tools.blue">#3f8ff6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.pdf-tools.purple">#8A56F9</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.pdf-tools.orange">#FFA153</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.norm.bg">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.norm.border">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.hov.bg">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.hov.border">#68acf8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.dis.bg">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.dis.border">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.dis.fill">#B1B3B8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.sel.bg">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.sel.fill">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.checkbox-radio.sel.border-radio">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.file.pdf">#F3465B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.file.image">#617CA1</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.arrow.gray.def">#94989C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.arrow.gray.act">#7C8085</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.arrow.gray.dis">#B1B3B8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.arrow.anti.def">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.arrow.anti.dis">#F7F8FA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.arrow.accent.norm">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.arrow.accent.hov">#3f8ff6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.arrow.accent.act">#0e53ca</SolidColorBrush>
+    <SolidColorBrush x:Key="color.icon.arrow.accent.dis">#92C6FB</SolidColorBrush>
+    <SolidColorBrush x:Key="color.badge.red.bg">#F3465B</SolidColorBrush>
+    <CornerRadius x:Key="radius.base.s">2</CornerRadius>
+    <CornerRadius x:Key="radius.base.m">4</CornerRadius>
+    <CornerRadius x:Key="radius.base.l">8</CornerRadius>
+    <CornerRadius x:Key="radius.fullround-btn.xs">10</CornerRadius>
+    <CornerRadius x:Key="radius.fullround-btn.s">12</CornerRadius>
+    <CornerRadius x:Key="radius.fullround-btn.m">16</CornerRadius>
+    <CornerRadius x:Key="radius.fullround-btn.l">20</CornerRadius>
+    <Style
+        x:Key="text.win.footnote"
+        BasedOn="{StaticResource text-windows.regular.11}"
+        TargetType="{x:Type TextBox}" />
+    <Style
+        x:Key="text.win.body.s"
+        BasedOn="{StaticResource text-windows.regular.12}"
+        TargetType="{x:Type TextBox}" />
+    <Style
+        x:Key="text.win.body.m-base"
+        BasedOn="{StaticResource text-windows.regular.14}"
+        TargetType="{x:Type TextBox}" />
+    <Style
+        x:Key="text.win.body.l"
+        BasedOn="{StaticResource text-windows.regular.16}"
+        TargetType="{x:Type TextBox}" />
+    <Style
+        x:Key="text.win.title.s"
+        BasedOn="{StaticResource text-windows.semibold.12}"
+        TargetType="{x:Type TextBox}" />
+    <Style
+        x:Key="text.win.title.m-base"
+        BasedOn="{StaticResource text-windows.semibold.14}"
+        TargetType="{x:Type TextBox}" />
+    <Style
+        x:Key="text.win.title.l"
+        BasedOn="{StaticResource text-windows.semibold.16}"
+        TargetType="{x:Type TextBox}" />
+    <Style
+        x:Key="text.win.title.xl"
+        BasedOn="{StaticResource text-windows.semibold.20}"
+        TargetType="{x:Type TextBox}" />
+    <DropShadowEffect
+        x:Key="shadow.neutral.s"
+        BlurRadius="2"
+        Direction="270"
+        Opacity=" 0.1"
+        ShadowDepth="2"
+        Color="#000000" />
+    <DropShadowEffect
+        x:Key="shadow.neutral.m"
+        BlurRadius="8"
+        Direction="270"
+        Opacity=" 0.16"
+        ShadowDepth="2"
+        Color="#000000" />
+    <DropShadowEffect
+        x:Key="shadow.accent.s"
+        BlurRadius="4"
+        Direction="270"
+        Opacity="0.4"
+        ShadowDepth="0"
+        Color="#1770F4" />
+    <DropShadowEffect
+        x:Key="shadow.error.s"
+        BlurRadius="4"
+        Direction="270"
+        Opacity=" 0.4"
+        ShadowDepth="0"
+        Color="#F3465B" />
+
+</ResourceDictionary>

+ 348 - 0
PDF Office/Themes/Global.xaml

@@ -0,0 +1,348 @@
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:sys="clr-namespace:System;assembly=mscorlib">
+    <!--  基础全局资源  -->
+    <sys:Double x:Key="sizing.1">1</sys:Double>
+    <sys:Double x:Key="sizing.4">4</sys:Double>
+    <sys:Double x:Key="sizing.8">8</sys:Double>
+    <sys:Double x:Key="sizing.10">10</sys:Double>
+    <sys:Double x:Key="sizing.12">12</sys:Double>
+    <sys:Double x:Key="sizing.14">14</sys:Double>
+    <sys:Double x:Key="sizing.16">16</sys:Double>
+    <sys:Double x:Key="sizing.18">18</sys:Double>
+    <sys:Double x:Key="sizing.20">20</sys:Double>
+    <sys:Double x:Key="sizing.21">21</sys:Double>
+    <sys:Double x:Key="sizing.22">22</sys:Double>
+    <sys:Double x:Key="sizing.24">24</sys:Double>
+    <sys:Double x:Key="sizing.26">26</sys:Double>
+    <sys:Double x:Key="sizing.28">28</sys:Double>
+    <sys:Double x:Key="sizing.30">30</sys:Double>
+    <sys:Double x:Key="sizing.32">32</sys:Double>
+    <sys:Double x:Key="sizing.34">34</sys:Double>
+    <sys:Double x:Key="sizing.36">36</sys:Double>
+    <sys:Double x:Key="sizing.40">40</sys:Double>
+    <sys:Double x:Key="sizing.48">48</sys:Double>
+    <sys:Double x:Key="sizing.50">50</sys:Double>
+    <sys:Double x:Key="sizing.58">58</sys:Double>
+    <sys:Double x:Key="sizing.60">60</sys:Double>
+    <sys:Double x:Key="sizing.64">64</sys:Double>
+    <sys:Double x:Key="sizing.68">68</sys:Double>
+    <sys:Double x:Key="sizing.72">72</sys:Double>
+    <sys:Double x:Key="sizing.110">110</sys:Double>
+    <sys:Double x:Key="sizing.116">116</sys:Double>
+    <sys:Double x:Key="sizing.120">120</sys:Double>
+    <sys:Double x:Key="sizing.132">132</sys:Double>
+    <sys:Double x:Key="sizing.139">139</sys:Double>
+    <sys:Double x:Key="sizing.180">180</sys:Double>
+    <sys:Double x:Key="sizing.200">202</sys:Double>
+    <sys:Double x:Key="sizing.228">228</sys:Double>
+    <sys:Double x:Key="sizing.260">260</sys:Double>
+    <sys:Double x:Key="spacing.0">0</sys:Double>
+    <sys:Double x:Key="spacing.1">1</sys:Double>
+    <sys:Double x:Key="spacing.2">2</sys:Double>
+    <sys:Double x:Key="spacing.4">4</sys:Double>
+    <sys:Double x:Key="spacing.5">5</sys:Double>
+    <sys:Double x:Key="spacing.6">6</sys:Double>
+    <sys:Double x:Key="spacing.8">8</sys:Double>
+    <sys:Double x:Key="spacing.10">10</sys:Double>
+    <sys:Double x:Key="spacing.12">12</sys:Double>
+    <sys:Double x:Key="spacing.16">16</sys:Double>
+    <sys:Double x:Key="spacing.24">24</sys:Double>
+    <sys:Double x:Key="spacing.32">32</sys:Double>
+    <sys:Double x:Key="spacing.40">40</sys:Double>
+    <sys:Double x:Key="spacing.56">56</sys:Double>
+    <sys:Double x:Key="spacing.64">64</sys:Double>
+    <sys:Double x:Key="spacing.80">80</sys:Double>
+    <sys:Double x:Key="spacing.88">88</sys:Double>
+    <SolidColorBrush x:Key="color.light.blue.1">#E8F5FF</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.blue.2">#BDDFFD</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.blue.3">#92C6FB</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.blue.4">#68acf8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.blue.5">#3f8ff6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.blue.6">#1770F4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.blue.7">#0e53ca</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.blue.8">#083aa0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.blue.9">#032576</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.blue.10">#00144d</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.1">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.2">#F7F8FA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.3">#EDEEF0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.4">#DFE1E5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.5">#CED0D4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.6">#B1B3B8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.7">#94989C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.8">#7C8085</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.9">#616469</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.10">#36383B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.11">#252629</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gray.12">#000000</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.1">#E8F4FF</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.2">#B5C9E0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.3">#88A1C0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.4">#617CA1</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.5">#415A81</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.6">#273C62</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.7">#1C305D</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.8">#112557</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.9">#081B52</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.navy-blue.10">#00114D</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.1">#E8FFF4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.2">#BAF7DA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.3">#8EEEC4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.4">#64E6B2</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.5">#3EDDA3</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.6">#1AD598</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.7">#10B382</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.8">#09916D</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.9">#036F56</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.green.10">#004D3D</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.1">#FFFAE8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.2">#FFF1C1</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.3">#FFE49A</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.4">#FFD573</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.5">#FFC34C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.6">#FFAF25</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.7">#D28717</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.8">#A6630C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.9">#794304</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.gold.10">#4D2600</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.1">#FFE9E8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.2">#FDC7C6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.3">#FAA5A7</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.4">#F8858B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.5">#F56571</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.6">#F3465B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.7">#C92C43</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.8">#A01730</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.9">#760920</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.red.10">#4D0013</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.1">#FFF5E8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.2">#FFE4C3</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.3">#FFD09E</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.4">#FFB978</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.5">#FFA153</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.6">#FF852E</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.7">#D2621C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.8">#A6440F</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.9">#792A05</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.orange.10">#4D1600</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.1">#E8FFFB</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.2">#B7F4EC</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.3">#89E9E0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.4">#5EDFD6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.5">#37D4CF</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.6">#14C9C9</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.7">#0DA5AA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.8">#07828B</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.9">#03616C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.cyan.10">#03616C</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.1">#F2E8FF</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.2">#DBC3FE</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.3">#C29EFC</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.4">#A77AFB</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.5">#8A56F9</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.6">#6C33F8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.7">#4B20CD</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.8">#3011A2</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.9">#1B0677</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.purple.10">#0B004D</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.1">#FFE8F5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.2">#FDC4E6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.3">#FBA0DA</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.4">#FA7CD0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.5">#F859C8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.6">#F637C4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.7">#CC22A4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.8">#A11285</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.9">#770764</SolidColorBrush>
+    <SolidColorBrush x:Key="color.light.pink.10">#4D0042</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.1">#10192a</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.2">#102343</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.3">#142f57</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.4">#153d79</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.5">#164fa6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.6">#1662d2</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.7">#3c86e8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.8">#65a7f3</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.9">#8dc3f8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.blue.10">#b7dbfa</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.1">#131314</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.2">#1D1D1F</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.3">#2C2C2E</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.4">#464647</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.5">#5F5F60</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.6">#78787A</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.7">#929293</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.8">#ABABAC</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.9">#C5C5C5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.10">#DFDFDF</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.11">#F6F6F6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gray.12">#ffffff</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.1">#101321</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.2">#0e1733</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.3">#0f1d44</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.4">#0d225c</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.5">#0b287d</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.6">#082f9d</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.7">#234eb1</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.8">#4570c6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.9">#6d93d5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.navy-blue.10">#98b7e4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.1">#112520</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.2">#113a2f</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.3">#154d3c</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.4">#166a4f</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.5">#18916a</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.6">#19b884</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.7">#3cce98</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.8">#65e5b2</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.9">#93f5cb</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.green.10">#bffade</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.1">#2b2012</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.2">#453115</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.3">#5a4219</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.4">#7d591c</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.5">#ac781f</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.6">#dc9822</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.7">#e7b249</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.8">#f3cc73</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.9">#f8e09d</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.gold.10">#faefc5</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.1">#291519</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.2">#411b21</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.3">#562229</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.4">#782a34</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.5">#a53442</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.6">#d13e50</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.7">#e76973</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.8">#f3959a</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.9">#f8bfc0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.red.10">#fae9e9</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.1">#2b1b13</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.2">#452716</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.3">#5a351c</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.4">#7d4620</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.5">#ac5d25</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.6">#dc742a</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.7">#e79450</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.8">#f3b57b</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.9">#f8cfa4</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.orange.10">#fae6cd</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.1">#102224</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.2">#103638</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.3">#134a4a</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.4">#136565</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.5">#14898a</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.6">#14aeae</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.7">#34c3be</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.8">#5bd9d0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.9">#87e9e0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.cyan.10">#b8f7f0</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.1">#18132b</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.2">#221743</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.3">#2e1d58</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.4">#3b217b</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.5">#4d28a8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.6">#5f2ed6</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.7">#8457e8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.8">#a981f3</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.9">#c8abf8</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.purple.10">#e5d5fa</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.1">#291326</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.2">#421739</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.3">#571e49</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.4">#792363</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.5">#a72a86</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.6">#d432aa</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.7">#e759bd</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.8">#f384ce</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.9">#f8aedd</SolidColorBrush>
+    <SolidColorBrush x:Key="color.dark.pink.10">#fad7ed</SolidColorBrush>
+    <CornerRadius x:Key="border-radius.2">2</CornerRadius>
+    <CornerRadius x:Key="border-radius.4">4</CornerRadius>
+    <CornerRadius x:Key="border-radius.6">6</CornerRadius>
+    <CornerRadius x:Key="border-radius.8">8</CornerRadius>
+    <CornerRadius x:Key="border-radius.10">10</CornerRadius>
+    <CornerRadius x:Key="border-radius.12">12</CornerRadius>
+    <CornerRadius x:Key="border-radius.16">16</CornerRadius>
+    <CornerRadius x:Key="border-radius.20">20</CornerRadius>
+    <Thickness x:Key="border-width.1">1</Thickness>
+    <Thickness x:Key="border-width.2">2</Thickness>
+    <DropShadowEffect
+        x:Key="shadow.black-2-2"
+        BlurRadius="2"
+        Direction="270"
+        Opacity=" 0.1"
+        ShadowDepth="2"
+        Color="#000000" />
+    <DropShadowEffect
+        x:Key="shadow.black-4-8"
+        BlurRadius="8"
+        Direction="270"
+        Opacity=" 0.08"
+        ShadowDepth="4"
+        Color="#000000" />
+    <DropShadowEffect
+        x:Key="shadow.black-2-8"
+        BlurRadius="8"
+        Direction="270"
+        Opacity=" 0.16"
+        ShadowDepth="2"
+        Color="#000000" />
+    <DropShadowEffect
+        x:Key="shadow.blue-0-4"
+        BlurRadius="4"
+        Direction="270"
+        Opacity="0.4"
+        ShadowDepth="0"
+        Color="#1770F4" />
+    <DropShadowEffect
+        x:Key="shadow.red-0-4"
+        BlurRadius="4"
+        Direction="270"
+        Opacity=" 0.4"
+        ShadowDepth="0"
+        Color="#F3465B" />
+    <Style x:Key="text-windows.regular.11" TargetType="{x:Type TextBox}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontWeight" Value="Regular" />
+        <Setter Property="FontSize" Value="11" />
+    </Style>
+    <Style x:Key="text-windows.regular.12" TargetType="{x:Type TextBox}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontWeight" Value="Regular" />
+        <Setter Property="FontSize" Value="12" />
+    </Style>
+    <Style x:Key="text-windows.regular.14" TargetType="{x:Type TextBox}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontWeight" Value="Regular" />
+        <Setter Property="FontSize" Value="14" />
+    </Style>
+    <Style x:Key="text-windows.regular.16" TargetType="{x:Type TextBox}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontWeight" Value="Regular" />
+        <Setter Property="FontSize" Value="16" />
+    </Style>
+    <Style x:Key="text-windows.semibold.12" TargetType="{x:Type TextBox}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontWeight" Value="Semibold" />
+        <Setter Property="FontSize" Value="12" />
+    </Style>
+    <Style x:Key="text-windows.semibold.14" TargetType="{x:Type TextBox}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontWeight" Value="Semibold" />
+        <Setter Property="FontSize" Value="14" />
+    </Style>
+    <Style x:Key="text-windows.semibold.16" TargetType="{x:Type TextBox}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontWeight" Value="Semibold" />
+        <Setter Property="FontSize" Value="16" />
+    </Style>
+    <Style x:Key="text-windows.semibold.20" TargetType="{x:Type TextBox}">
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="FontWeight" Value="Semibold" />
+        <Setter Property="FontSize" Value="20" />
+    </Style>
+
+</ResourceDictionary>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 268
PDF Office/UpgradeLog.htm


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 268
PDF Office/UpgradeLog2.htm


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 268
PDF Office/UpgradeLog3.htm


+ 25 - 18
PDF Office/ViewModels/BOTA/BOTAContentViewModel.cs

@@ -9,23 +9,25 @@ using ComPDFKitViewer.PdfViewer;
 using PDF_Office.Model;
 using Prism.Commands;
 using System.Windows.Controls;
+using DryIoc;
+using Prism.Services.Dialogs;
 
 namespace PDF_Office.ViewModels.BOTA
 {
-    public class BOTAContentViewModel:BindableBase, INavigationAware
+    public class BOTAContentViewModel : BindableBase, INavigationAware
     {
-
         private CPDFViewer pdfViewer { get; set; }
 
         private IRegionManager regions { get; set; }
+        private IDialogService dialogs { get; set; }
 
         private ViewContentViewModel viewContentViewModel { get; set; }
 
-        private Dictionary<string, string> viewNameByTabItem { get; set; }
+        private Dictionary<string, string> viewNameByTabItem;
 
         private string botaContentRegionName;
 
-        public string BOTAContentRegionNmae
+        public string BOTAContentRegionName
         {
             get { return botaContentRegionName; }
             set
@@ -36,35 +38,35 @@ namespace PDF_Office.ViewModels.BOTA
 
         public DelegateCommand<object> TabControlSelectionChangedCommand { get; set; }
 
-        public BOTAContentViewModel(IRegionManager regionManager)
+        public BOTAContentViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
             regions = regionManager;
-            
-            BOTAContentRegionNmae = Guid.NewGuid().ToString();
-
-            InitDictionartViewNameByTabItem();
+            dialogs = dialogService;
+            BOTAContentRegionName = Guid.NewGuid().ToString();
+            TabControlSelectionChangedCommand = new DelegateCommand<object>(TabControlSelectionChangedEvent);
+            viewNameByTabItem = new Dictionary<string, string>();
+            InitDictionartViewNameByTabItem(ref viewNameByTabItem);
         }
 
-
         private void TabControlSelectionChangedEvent(object e)
         {
             var args = e as SelectionChangedEventArgs;
             if (args != null)
             {
                 EnterSelectedBar((args.AddedItems[0] as TabItem).Name);
+                viewContentViewModel.OpenBOTA = true;
             }
         }
 
         /// <summary>
         /// 初始化名称-视图字典
         /// </summary>
-        private void InitDictionartViewNameByTabItem()
+        private void InitDictionartViewNameByTabItem(ref Dictionary<string, string> viewNameByTabItem)
         {
-            viewNameByTabItem = new Dictionary<string, string>();
             //绑定tabitem名字和对应的View控件名称
-            viewNameByTabItem.Add("TabItemThumbnail","");
+            viewNameByTabItem.Add("TabItemThumbnail", "PageEditContent");
             viewNameByTabItem.Add("TabItemOutLine", "");
-            viewNameByTabItem.Add("TabItemBookMark", "");
+            viewNameByTabItem.Add("TabItemBookMark", "BookmarkContent");
             viewNameByTabItem.Add("TabItemAnnotation", "");
             viewNameByTabItem.Add("TabItemSearch", "");
             viewNameByTabItem.Add("TabItemForm", "");
@@ -79,10 +81,15 @@ namespace PDF_Office.ViewModels.BOTA
         {
             NavigationParameters param = new NavigationParameters();
             param.Add(ParameterNames.PDFViewer, pdfViewer);
-            regions.RequestNavigate(BOTAContentRegionNmae, viewNameByTabItem[currentBar], param);
+            if(currentBar== "TabItemThumbnail")
+            {
+                param.Add(ParameterNames.BOTAThumb,true);
+            }
+            regions.RequestNavigate(BOTAContentRegionName, viewNameByTabItem[currentBar], param);
         }
 
         #region Navigate
+
         public bool IsNavigationTarget(NavigationContext navigationContext)
         {
             return true;
@@ -90,7 +97,6 @@ namespace PDF_Office.ViewModels.BOTA
 
         public void OnNavigatedFrom(NavigationContext navigationContext)
         {
-
         }
 
         public void OnNavigatedTo(NavigationContext navigationContext)
@@ -106,6 +112,7 @@ namespace PDF_Office.ViewModels.BOTA
                 pdfViewer = pdfview;
             }
         }
-        #endregion
+
+        #endregion Navigate
     }
-}
+}

+ 371 - 0
PDF Office/ViewModels/BOTA/BookmarkContentViewModel.cs

@@ -0,0 +1,371 @@
+using ComPDFKit.PDFDocument;
+using ComPDFKitViewer.PdfViewer;
+using ImTools;
+using Microsoft.Office.Interop.Word;
+using PDF_Office.CustomControl;
+using PDF_Office.Helper;
+using PDF_Office.Model;
+using PDF_Office.Model.PageEdit;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Reflection;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Forms;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using static Dropbox.Api.Files.SearchMatchType;
+using static Dropbox.Api.TeamLog.AdminAlertSeverityEnum;
+using static System.Net.Mime.MediaTypeNames;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement;
+using KeyEventArgs = System.Windows.Input.KeyEventArgs;
+using ListViewItem = System.Windows.Controls.ListViewItem;
+using TextBox = System.Windows.Controls.TextBox;
+
+namespace PDF_Office.ViewModels.BOTA
+{
+    public class BookmarkContentViewModel : BindableBase, INavigationAware
+    {
+        #region 属性
+
+        private IRegionManager region;
+        private IDialogService dialogs;
+        public CPDFViewer PDFViewer;
+
+        /// <summary>
+        /// 书签ItemSouce
+        /// </summary>
+        private ObservableCollection<CPDFBookmark> bookmarklist;
+
+        public ObservableCollection<CPDFBookmark> Bookmarklist
+        {
+            get
+            {
+                return bookmarklist;
+            }
+            set
+            {
+                SetProperty(ref bookmarklist, value);
+            }
+        }
+
+        /// <summary>
+        /// 书签列表为空时,显示状态
+        /// </summary>
+        private Visibility isEmpty;
+
+        public Visibility IsEmptyPanelVisibility
+        {
+            get
+            {
+                return isEmpty;
+            }
+            set
+            {
+                SetProperty(ref isEmpty, value);
+            }
+        }
+
+        #endregion 属性
+
+        #region 命令
+
+        public DelegateCommand<object> KeyDownCommand { get; set; }
+
+        public DelegateCommand<object> LostFocusCommand { get; set; }
+
+        public DelegateCommand<object> AddBookmarkCommand { get; set; }
+
+        public DelegateCommand<object> ListViewItemMouseDownCommand { get; set; }
+
+        public DelegateCommand<object> EditPageIndexCommand { get; set; }
+
+        public DelegateCommand<object> DeleteCommand { get; set; }
+
+        #endregion 命令
+
+        public BookmarkContentViewModel(IRegionManager regionManager, IDialogService dialogService)
+        {
+            region = regionManager;
+            dialogs = dialogService;
+
+            Bookmarklist = new ObservableCollection<CPDFBookmark>();
+
+            LostFocusCommand = new DelegateCommand<object>(LostFocusEvent);
+
+            AddBookmarkCommand = new DelegateCommand<object>(AddBookmarkEvent);
+            ListViewItemMouseDownCommand = new DelegateCommand<object>(ListViewItemMouseLeftButtonDownEvent);
+
+            DeleteCommand = new DelegateCommand<object>(DelegateEvent);
+            EditPageIndexCommand = new DelegateCommand<object>(EditPageIndexEvent);
+            KeyDownCommand = new DelegateCommand<object>(KeyDownEvent);
+        }
+
+        /// <summary>
+        /// 检测ObservableCollection的数据变更
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void Bookmarklist_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+        {
+            ObservableCollection<CPDFBookmark> obsSender = sender as ObservableCollection<CPDFBookmark>;
+            if (obsSender != null)
+            {
+                if (obsSender.Count < 1)
+                {
+                    IsEmptyPanelVisibility = Visibility.Visible;
+                }
+                else
+                {
+                    IsEmptyPanelVisibility = Visibility.Collapsed;
+                }
+            }
+        }
+
+        /// <summary>
+        /// 文本框按下Enter键
+        /// </summary>
+        /// <param name="obj"></param>
+        private void KeyDownEvent(object obj)
+        {
+            if (obj is KeyEventArgs)
+            {
+                KeyEventArgs keyEventArgs = (KeyEventArgs)obj;
+                if (keyEventArgs.Key == Key.Enter)
+                {
+                    if (keyEventArgs.OriginalSource is TextBox)
+                    {
+                        TextBox textBox = (TextBox)keyEventArgs.OriginalSource;
+                        ListViewItem listViewItem = CommonHelper.FindVisualParent<ListViewItem>(textBox);
+                        UpdateTitle(listViewItem, textBox);
+                        TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(listViewItem);
+                        textBlock.Text = textBox.Text;
+                        textBlock.Visibility = Visibility.Visible;
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// 重新定位
+        /// </summary>
+        /// <param name="obj"></param>
+        private void EditPageIndexEvent(object obj)
+        {
+            CPDFBookmark bookmark = obj as CPDFBookmark;
+            if (bookmark != null)
+            {
+                AlertsMessage alertsMessage = new AlertsMessage();
+                alertsMessage.ShowDialog("提示", "确定要将选定大纲的目标位置设置为当前位置吗?", "Cancel", "OK");
+                if (alertsMessage.result == ContentResult.Ok)
+                {
+                    if (RemoveBookMark(bookmark))
+                    {
+                        bookmarklist.Remove(bookmark);
+
+                        CPDFBookmark cPDFBookmark = new CPDFBookmark();
+                        bookmark.Title = bookmark.Title;
+                        bookmark.Date = DateTime.Now.ToString(@"yyyyMMddHHmmsszzz\'").Replace(':', '\'') + "\n";
+                        bookmark.PageIndex = PDFViewer.CurrentIndex;
+
+                        if (PDFViewer.Document.AddBookmark(bookmark))
+                        {
+                            PDFViewer.UndoManager.CanSave = true;
+                            Bookmarklist.Add(bookmark);
+                        }
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// 右键菜单-删除
+        /// </summary>
+        /// <param name="obj"></param>
+        private void DelegateEvent(object obj)
+        {
+            CPDFBookmark bookmark = obj as CPDFBookmark;
+            if (bookmark != null)
+            {
+                if (RemoveBookMark(bookmark))
+                {
+                    Bookmarklist.Remove(bookmark);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 删除书签
+        /// </summary>
+        /// <param name="item"></param>
+        /// <returns></returns>
+        private bool RemoveBookMark(CPDFBookmark item)
+        {
+            var data = item;
+            if (data == null)
+            {
+                return false;
+            }
+            return PDFViewer.Document.RemoveBookmark(data.PageIndex);
+        }
+
+        /// <summary>
+        /// ListViewItem失去焦点
+        /// </summary>
+        /// <param name="obj"></param>
+        private void LostFocusEvent(object obj)
+        {
+            TextBox textBox = null;
+            ListViewItem listViewItem = null;
+            if (obj is CompositeCommandParameter)
+            {
+                CompositeCommandParameter parameter = (CompositeCommandParameter)obj;
+                if (parameter.Parameter is TextBox)
+                {
+                    textBox = (TextBox)parameter.Parameter;
+                    listViewItem = CommonHelper.FindVisualParent<ListViewItem>(textBox);
+                }
+            }
+            if (obj is ListBoxItem)
+            {
+                listViewItem = (ListViewItem)(obj);
+                textBox = CommonHelper.FindVisualChild<TextBox>(listViewItem);
+            }
+            UpdateTitle(listViewItem, textBox);
+        }
+
+        /// <summary>
+        /// 修改书签标题
+        /// </summary>
+        /// <param name="listViewItem"></param>
+        /// <param name="textBox"></param>
+        private void UpdateTitle(ListViewItem listViewItem, TextBox textBox)
+        {
+            if (listViewItem != null)
+            {
+                var data = listViewItem.DataContext as CPDFBookmark;
+                if (data == null)
+                {
+                    return;
+                }
+                var result = PDFViewer.Document.EditBookmark(data.PageIndex, textBox.Text.Trim());
+                if (result)
+                {
+                    data.Title = textBox.Text.Trim();
+                    PDFViewer.UndoManager.CanSave = true;
+                }
+            }
+        }
+
+        /// <summary>
+        /// ListBoxItem左键单击,页面跳转
+        /// </summary>
+        /// <param name="obj"></param>
+        private void ListViewItemMouseLeftButtonDownEvent(object obj)
+        {
+            ListBoxItem listBoxItem = (obj as ListBoxItem);
+
+            if (listBoxItem != null)
+            {
+                if (!(listBoxItem.DataContext is CPDFBookmark))
+                {
+                    return;
+                }
+                int index = (listBoxItem.DataContext as CPDFBookmark).PageIndex;
+                PDFViewer.GoToPage(index);
+            }
+        }
+
+        /// <summary>
+        /// 添加书签
+        /// </summary>
+        /// <param name="obj"></param>
+        private void AddBookmarkEvent(object obj)
+        {
+            int index = PDFViewer.CurrentIndex;
+            string mark = string.Format($"第{index + 1}页");
+
+            var list = PDFViewer.Document.GetBookmarkList().FindAll(q => q.PageIndex == index);
+
+            if (list.Count > 0)
+            {
+                System.Windows.Controls.ListView listView = obj as System.Windows.Controls.ListView;
+                if (listView != null)
+                {
+                    ListBoxItem myListBoxItem = (ListBoxItem)(listView.ItemContainerGenerator.ContainerFromItem(list[0]));
+
+                    if (myListBoxItem.IsSelected == false)
+                    {
+                        myListBoxItem.IsSelected = true;
+                        myListBoxItem.Focus();
+                    }
+                    return;
+                }
+            }
+            DialogParameters value = new DialogParameters();
+            value.Add(ParameterNames.Bookmark, mark);
+            value.Add(ParameterNames.Title, "创建一个新的书签");
+            dialogs.ShowDialog(DialogNames.AddBookmarkDialog, value, e =>
+            {
+                if (e.Result == ButtonResult.OK && e.Parameters != null)
+                {
+                    if (e.Parameters.ContainsKey(ParameterNames.Bookmark))
+                    {
+                        mark = e.Parameters.GetValue<string>(ParameterNames.Bookmark).ToString();
+                        CPDFBookmark bookmark = new CPDFBookmark();
+                        bookmark.Title = mark;
+                        bookmark.Date = DateTime.Now.ToString(@"yyyyMMddHHmmsszzz\'").Replace(':', '\'') + "\n";
+                        bookmark.PageIndex = PDFViewer.CurrentIndex;
+
+                        if (PDFViewer.Document.AddBookmark(bookmark))
+                        {
+                            PDFViewer.UndoManager.CanSave = true;
+
+                            Bookmarklist.Add(bookmark);
+                        }
+                    }
+                }
+            });
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+            navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
+            if (PDFViewer == null)
+            {
+                IsEmptyPanelVisibility = Visibility.Visible;
+                return;
+            }
+
+            Bookmarklist = new ObservableCollection<CPDFBookmark>(PDFViewer.Document.GetBookmarkList().OrderBy(d => d.Title));
+            Bookmarklist.CollectionChanged += Bookmarklist_CollectionChanged;
+            if (Bookmarklist.Count < 1)
+            {
+                IsEmptyPanelVisibility = Visibility.Visible;
+                return;
+            }
+            else
+            {
+                IsEmptyPanelVisibility = Visibility.Hidden;
+                return;
+            }
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+    }
+}

+ 141 - 71
PDF Office/ViewModels/BottomToolContentViewModel.cs

@@ -18,9 +18,8 @@ using PDF_Office.Model;
 
 namespace PDF_Office.ViewModels
 {
-    public class BottomToolContentViewModel : BindableBase
+    public class BottomToolContentViewModel : BindableBase, INavigationAware
     {
-
         public DelegateCommand Load { get; set; }
 
         public DelegateCommand FirstPageCommand { get; set; }
@@ -53,6 +52,22 @@ namespace PDF_Office.ViewModels
 
         public DelegateCommand<object> SelectionChangedCommand { get; set; }
 
+        public DelegateCommand<object> ShowViewModularCommand { get; set; }
+
+        private bool isShowViewModular = false;
+
+        /// <summary>
+        /// 属性栏是否展开
+        /// </summary>
+        public bool IsShowViewModular
+        {
+            get { return isShowViewModular; }
+            set
+            {
+                SetProperty(ref isShowViewModular, value);
+            }
+        }
+
         private bool isSingleView;
 
         public bool IsSingleView
@@ -151,33 +166,49 @@ namespace PDF_Office.ViewModels
             }
         }
 
-
-
         public CPDFViewer PDFViewer { get; set; }
 
+        private ViewContentViewModel viewContentViewModel { get; set; }
 
         private IRegionManager region;
 
         private IDialogService dialogs;
 
-        public BottomToolContentViewModel(IRegionManager regionManager,IDialogService dialogService)
+        public BottomToolContentViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
             region = regionManager;
             dialogs = dialogService;
 
-            Load = new DelegateCommand(LoadControl);
-
             PrePageCommand = new DelegateCommand(GoPrePage, CanPrePageExcute).ObservesProperty(() => CurrentPage);
             NextPageCommand = new DelegateCommand(GoNextPage, CanNextPageExcute).ObservesProperty(() => CurrentPage);
             FirstPageCommand = new DelegateCommand(GoFirstPage, CanPrePageExcute).ObservesProperty(() => CurrentPage);
             LastPageCommand = new DelegateCommand(GoLastPage, CanNextPageExcute).ObservesProperty(() => CurrentPage);
-            ZoomInCommand = new DelegateCommand(ZoomIn, CanZoomIn).ObservesProperty(()=>CurrentZoom);
-            ZoomOutCommand = new DelegateCommand(ZoomOut, CanZoomOut).ObservesProperty(()=>CurrentZoom);
+            ZoomInCommand = new DelegateCommand(ZoomIn, CanZoomIn).ObservesProperty(() => CurrentZoom);
+            ZoomOutCommand = new DelegateCommand(ZoomOut, CanZoomOut).ObservesProperty(() => CurrentZoom);
             SetViewModeCommand = new DelegateCommand(SetModeView);
             PageTextKeyDownCommand = new DelegateCommand<object>(PageNumText_KeyDown);
             PageTextPreviewKeyDownCommand = new DelegateCommand<object>(PageNumText_PreviewKeyDown);
             SelectionChangedCommand = new DelegateCommand<object>(SelectionChangedEvent);
             OpenFullCommand = new DelegateCommand(OpenFullWindow);
+            ShowViewModularCommand = new DelegateCommand<object>(ShowViewModularEvent);
+        }
+
+        private void ShowViewModularEvent(object obj)
+        {
+            if (viewContentViewModel.IsPropertyOpen == false)
+            {
+                viewContentViewModel.IsPropertyOpen = true;
+
+                NavigationParameters param = new NavigationParameters();
+                param.Add(ParameterNames.PDFViewer, PDFViewer);
+                param.Add(ParameterNames.BottomToolContentViewModel, this);
+                region.RequestNavigate(RegionNames.PropertyRegionName, "ViewModularContent", param);
+            }
+            else
+            {
+                viewContentViewModel.IsPropertyOpen = false;
+            }
+            IsShowViewModular = viewContentViewModel.IsPropertyOpen;
         }
 
         /// <summary>
@@ -187,14 +218,15 @@ namespace PDF_Office.ViewModels
         {
             DialogParameters parameters = new DialogParameters();
             //因为全屏模式可能需要设置特定的页面模式,所以只传文件路径,新建一个PDFview对象
-            parameters.Add(ParameterNames.FilePath,PDFViewer.Document.FilePath);
-            parameters.Add(ParameterNames.PassWord,PDFViewer.Tag==null?"":PDFViewer.Tag.ToString());
-            dialogs.ShowDialog(DialogNames.FullScreenDialog,parameters,e=> { 
-                if(e.Result==ButtonResult.Cancel)
+            parameters.Add(ParameterNames.FilePath, PDFViewer.Document.FilePath);
+            parameters.Add(ParameterNames.PassWord, PDFViewer.Tag == null ? "" : PDFViewer.Tag.ToString());
+            dialogs.ShowDialog(DialogNames.FullScreenDialog, parameters, e =>
+            {
+                if (e.Result == ButtonResult.Cancel)
                 {
                     //TODO:弹窗提示打开全屏模式失败
                     AlertsMessage alertsMessage = new AlertsMessage();
-                    alertsMessage.ShowDialog("","Error","OK");
+                    alertsMessage.ShowDialog("", "Error", "OK");
                     return;
                 }
             });
@@ -203,21 +235,24 @@ namespace PDF_Office.ViewModels
         private void SelectionChangedEvent(object e)
         {
             var args = e as SelectionChangedEventArgs;
-            if(args!=null)
+            if (args != null)
             {
-                if(SelectedIndex<=2)
+                if (SelectedIndex <= 2)
                 {
                     switch (SelectedIndex)
                     {
                         case 0:
                             PDFViewer.ChangeFitMode(FitMode.FitSize);
                             break;
+
                         case 1:
                             PDFViewer.ChangeFitMode(FitMode.FitWidth);
                             break;
+
                         case 2:
                             PDFViewer.ChangeFitMode(FitMode.FitHeight);
                             break;
+
                         default:
                             break;
                     }
@@ -232,14 +267,13 @@ namespace PDF_Office.ViewModels
                         }
                     }
                 }
-    
             }
         }
 
         private void PageNumText_PreviewKeyDown(object e)
         {
             var args = e as KeyEventArgs;
-            if(args != null)
+            if (args != null)
             {
                 //显示文本框输入内容
                 List<Key> NumberKeys = new List<Key>() { Key.D0,Key.D1,Key.D2,Key.D3,Key.D4,Key.D5,Key.D6,Key.D7,Key.D8,Key.D9,Key.NumPad0,Key.NumPad1,Key.NumPad2,
@@ -302,13 +336,12 @@ namespace PDF_Office.ViewModels
             return false;
         }
 
-
         private void GoNextPage()
         {
             if (PDFViewer != null)
             {
                 PDFViewer.GoToPage(PDFViewer.CurrentIndex + 1);
-                if(((int)PDFViewer.Mode%2)==0)
+                if (((int)PDFViewer.Mode % 2) == 0)
                 {
                     PDFViewer.GoToPage(PDFViewer.CurrentIndex + 2);
                 }
@@ -345,43 +378,66 @@ namespace PDF_Office.ViewModels
 
         private void ZoomIn()
         {
-            var zoom = PDFViewer.ZoomFactor*100;
-            if (zoom >= 1 && zoom <= 100)
-            {
-                PDFViewer.Zoom((zoom + 5) / 100.0);
-            }
-            else if (zoom <= 500)
-            {
-                PDFViewer.Zoom((zoom + 50) / 100.0);
-            }
-            else
-            {
-                PDFViewer.Zoom((zoom + 100) / 100.0);
-            }
+            double zoom = SetPageZoomFactor(true);
+            PDFViewer.Zoom(zoom / 100);
         }
 
         private void ZoomOut()
         {
-            var zoom = PDFViewer.ZoomFactor*100;
-            if (zoom >= 1 && zoom <= 100)
+            double zoom = SetPageZoomFactor(false);
+            PDFViewer.Zoom(zoom / 100);
+        }
+
+        private double SetPageZoomFactor(bool flag)
+        {
+            double zoom = PDFViewer.ZoomFactor * 100;
+            if (flag)
+            {
+                if (zoom >= 25 && zoom <= 300)
+                {
+                    zoom = zoom + 25;
+                }
+                else if (zoom >= 301 && zoom <= 1000)
+                {
+                    zoom = zoom + 40;
+                }
+                else if (zoom >= 1001 && zoom <= 10000)
+                {
+                    zoom = zoom + 100;
+                }
+            }
+            else
             {
-                PDFViewer.Zoom((zoom - 5)/100.0);
+                if (zoom >= 25 && zoom <= 300)
+                {
+                    zoom = zoom - 25;
+                }
+                else if (zoom >= 301 && zoom <= 1000)
+                {
+                    zoom = zoom - 40;
+                }
+                else if (zoom >= 1001 && zoom <= 10000)
+                {
+                    zoom = zoom - 100;
+                }
             }
-            else if (zoom <= 500)
+
+            if (zoom < 25)
             {
-                PDFViewer.Zoom((zoom - 50) / 100.0);
+                zoom = 25;
             }
-            else
+            if (zoom > 10000)
             {
-                PDFViewer.Zoom((zoom - 100) / 100.0);
+                zoom = 10000;
             }
+            return zoom;
         }
 
         private bool CanZoomIn()
         {
             if (PDFViewer != null)
             {
-                if (PDFViewer.ZoomFactor*100 >=1000)
+                if (PDFViewer.ZoomFactor * 100 >= 10000)
                     return false;
                 else
                     return true;
@@ -393,7 +449,7 @@ namespace PDF_Office.ViewModels
         {
             if (PDFViewer != null)
             {
-                if (PDFViewer.ZoomFactor*100 <=1)
+                if (PDFViewer.ZoomFactor * 100 <= 25)
                     return false;
                 else
                     return true;
@@ -401,26 +457,7 @@ namespace PDF_Office.ViewModels
             return false;
         }
 
-
-        private void LoadControl()
-        {
-            if (App.mainWindowViewModel.CurrentPDFViewer != null)
-            {
-                PDFViewer = App.mainWindowViewModel.CurrentPDFViewer;
-                if (PDFViewer != null)
-                {
-                    //获取页面设置等信息
-                    PageCount = PDFViewer.Document.PageCount;
-                    GetModeView(PDFViewer.ModeView);
-                    CurrentPage = PDFViewer.CurrentIndex+1;
-                    CurrentZoom = PDFViewer.ZoomFactor*100;
-                    PDFViewer.InfoChanged += PDFViewer_InfoChanged;
-                }
-
-            }
-        }
-
-        private void PDFViewer_InfoChanged(object sender, KeyValuePair<string, object> e)
+        public void PDFViewer_InfoChanged(object sender, KeyValuePair<string, object> e)
         {
             if (e.Key == "PageNum")
             {
@@ -431,9 +468,9 @@ namespace PDF_Office.ViewModels
             {
                 GetModeView((ViewMode)e.Value);
             }
-            if(e.Key=="Zoom")
+            if (e.Key == "Zoom")
             {
-                CurrentZoom = (double)e.Value*100;
+                CurrentZoom = (double)e.Value * 100;
                 SelectedIndex = -1;
             }
         }
@@ -442,11 +479,10 @@ namespace PDF_Office.ViewModels
         {
             if ((int)mode % 2 == 0)
             {
-                if(!IsContinue)
+                if (!IsContinue)
                 {
                     IsContinue = true;
                 }
-               
             }
             else
             {
@@ -458,28 +494,28 @@ namespace PDF_Office.ViewModels
 
             if ((int)mode <= 2)
             {
-                if(!isSingleView)
+                if (!isSingleView)
                 {
                     IsSingleView = true;
                 }
             }
             else if ((int)mode <= 4)
             {
-                if(!isDoubleView)
+                if (!isDoubleView)
                 {
                     IsDoubleView = true;
                 }
             }
             else
             {
-                if(!isBookMode)
+                if (!isBookMode)
                 {
                     IsBookMode = true;
                 }
             }
         }
 
-        private void SetModeView()
+        public void SetModeView()
         {
             if (PDFViewer != null)
             {
@@ -516,5 +552,39 @@ namespace PDF_Office.ViewModels
             }
         }
 
+        #region Navigation
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+            var viewContentViewModel = navigationContext.Parameters[ParameterNames.ViewContentViewModel] as ViewContentViewModel;
+            if (viewContentViewModel != null)
+            {
+                this.viewContentViewModel = viewContentViewModel;
+                IsShowViewModular = viewContentViewModel.IsPropertyOpen;
+            }
+
+            var pdfview = navigationContext.Parameters[ParameterNames.PDFViewer] as CPDFViewer;
+            if (pdfview != null)
+            {
+                //获取页面设置等信息
+                PDFViewer = pdfview;
+                PageCount = PDFViewer.Document.PageCount;
+                GetModeView(PDFViewer.ModeView);
+                CurrentPage = PDFViewer.CurrentIndex + 1;
+                CurrentZoom = PDFViewer.ZoomFactor * 100;
+                PDFViewer.InfoChanged += PDFViewer_InfoChanged;
+            }
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+        }
+
+        #endregion Navigation
     }
-}
+}

+ 81 - 0
PDF Office/ViewModels/Dialog/BOTA/AddBookmarkDialogViewModel.cs

@@ -0,0 +1,81 @@
+using PDF_Office.Model;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.ViewModels.Dialog.BOTA
+{
+    public class AddBookmarkDialogViewModel : BindableBase, IDialogAware
+    {
+        //public string Title => "";
+        private string title;
+
+        public string Title
+        {
+            get { return title; }
+            set { SetProperty(ref title, value); }
+        }
+
+        public event Action<IDialogResult> RequestClose;
+
+        private string bookmark;
+
+        public string Bookmark
+        {
+            get { return bookmark; }
+            set
+            {
+                SetProperty(ref bookmark, value);
+            }
+        }
+
+        public DelegateCommand CancelCommand { get; set; }
+
+        public DelegateCommand CreateCommnad { get; set; }
+
+        public AddBookmarkDialogViewModel()
+        {
+            CancelCommand = new DelegateCommand(CancelEvent);
+            CreateCommnad = new DelegateCommand(CreateEvent);
+        }
+
+        private void CreateEvent()
+        {
+            DialogParameters valuePairs = new DialogParameters();
+            valuePairs.Add(ParameterNames.Bookmark, Bookmark);
+            RequestClose.Invoke(new DialogResult(ButtonResult.OK, valuePairs));
+        }
+
+        private void CancelEvent()
+        {
+            RequestClose.Invoke(new DialogResult(ButtonResult.Cancel));
+        }
+
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
+
+        public void OnDialogClosed()
+        {
+            return;
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+            string mark;
+            parameters.TryGetValue<string>(ParameterNames.Bookmark, out mark);
+            Bookmark = mark;
+
+            string title;
+            parameters.TryGetValue<string>(ParameterNames.Title, out title);
+            Title = title;
+            return;
+        }
+    }
+}

+ 72 - 0
PDF Office/ViewModels/Dialog/BOTA/BookmarkInfoDialogViewModel.cs

@@ -0,0 +1,72 @@
+using Microsoft.Office.Interop.Word;
+using PDF_Office.Model;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.ViewModels.Dialog.BOTA
+{
+    internal class BookmarkInfoDialogViewModel : BindableBase, IDialogAware
+    {
+        private string bookmarkInfo;
+
+        public string BookmarkInfo
+        {
+            get { return bookmarkInfo; }
+            set
+            {
+                SetProperty(ref bookmarkInfo, value);
+            }
+        }
+
+        public DelegateCommand CancelCommand { get; set; }
+
+        public DelegateCommand OkCommnad { get; set; }
+
+        public string Title => "";
+
+        public event Action<IDialogResult> RequestClose;
+
+        public BookmarkInfoDialogViewModel()
+        {
+            CancelCommand = new DelegateCommand(CancelEvent);
+            OkCommnad = new DelegateCommand(OkEvent);
+        }
+
+        private void CancelEvent()
+        {
+            RequestClose.Invoke(new DialogResult(ButtonResult.Cancel));
+        }
+
+        private void OkEvent()
+        {
+            RequestClose.Invoke(new DialogResult(ButtonResult.OK));
+        }
+
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
+
+        public void OnDialogClosed()
+        {
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+            string mark;
+            parameters.TryGetValue<string>(ParameterNames.BookmarkInfo, out mark);
+            BookmarkInfo = mark;
+
+            //string title;
+            //parameters.TryGetValue<string>(ParameterNames.Title, out title);
+            //Title = title;
+            return;
+        }
+    }
+}

+ 152 - 3
PDF Office/ViewModels/Dialog/PageEditDialogs/InsertDialogViewModel.cs

@@ -1,11 +1,15 @@
-using Prism.Commands;
+using PDF_Office.Model;
+using PDF_Office.Model.PageEdit;
+using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Services.Dialogs;
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows;
 
 namespace PDF_Office.ViewModels.Dialog.PageEditDialogs
 {
@@ -13,16 +17,152 @@ namespace PDF_Office.ViewModels.Dialog.PageEditDialogs
     {
         public string Title =>"";
 
+        /// <summary>
+        /// 数据模型
+        /// </summary>
+        private CustomInsertModel Model = new CustomInsertModel();
+
         public event Action<IDialogResult> RequestClose;
 
+        private string currentPageSize;
+
+        /// <summary>
+        /// 当前页的尺寸大小  括号显示的形式
+        /// </summary>
+        public string CurrentPageSize
+        {
+            get { return currentPageSize; }
+            set
+            {
+                SetProperty(ref currentPageSize, value);
+            }
+        }
+
+        private int itemSelectedIndex = 0;
+
+        /// <summary>
+        /// 自定义页面的选中索引
+        /// </summary>
+        public int ItemSelectedIndex
+        {
+            get { return itemSelectedIndex; }
+            set
+            {
+                SetProperty(ref itemSelectedIndex, value);
+                if(Model!=null)
+                {
+                    Model.filepath = Pages[itemSelectedIndex].FilePath;
+                }
+            }
+        }
+
+
+        private string customWidth;
+        /// <summary>
+        /// 自定义页面宽度
+        /// </summary>
+        public string CustomWidth
+        {
+            get { return customWidth; }
+            set
+            {
+                SetProperty(ref customWidth, value);
+            }
+        }
+
+        private string customHeight;
+        /// <summary>
+        /// 自定义页面高度
+        /// </summary>
+        public string CustomHeight
+        {
+            get { return customHeight; }
+            set
+            {
+                SetProperty(ref customHeight, value);
+            }
+        }
+
+
+
+
+        /// <summary>
+        /// 自定义页面的路径集合
+        /// </summary>
+        public ObservableCollection<CustomPageItem> Pages { get; set; }
+
+        /// <summary>
+        /// 页面单位集合
+        /// </summary>
+        public List<string> Units { get; set; }
+
         public DelegateCommand CancelCommand { get; set; }
 
         public DelegateCommand InsertCommnad { get; set; }
 
+        /// <summary>
+        /// 页面方向选择的事件
+        /// </summary>
+        public DelegateCommand<string> OrientationCheckedCommand { get; set; }
+
         public InsertDialogViewModel()
         {
+            InitPageSource();
+            InitUnits();
+
             CancelCommand = new DelegateCommand(cancel);
             InsertCommnad = new DelegateCommand(insert);
+            OrientationCheckedCommand = new DelegateCommand<string>(OrientationChecked);
+        }
+
+        /// <summary>
+        /// 初始化页面大小单位集合
+        /// </summary>
+        private  void InitUnits()
+        {
+
+        }
+
+        /// <summary>
+        /// 初始化自定义页面集合
+        /// </summary>
+        private void InitPageSource()
+        {
+            Pages = new ObservableCollection<CustomPageItem>();
+            Pages.Add(new CustomPageItem() {Name="空白页",FilePath = ""});
+            Pages.Add(new CustomPageItem() { Name="横线",FilePath= System.IO.Path.Combine(Environment.CurrentDirectory, @"Resources\PageEdit\HorizontalLine.png")});
+            Pages.Add(new CustomPageItem() { Name = "五线谱", FilePath = System.IO.Path.Combine(Environment.CurrentDirectory, @"Resources\PageEdit\Staff.png") });
+            Pages.Add(new CustomPageItem() { Name = "格子线", FilePath = System.IO.Path.Combine(Environment.CurrentDirectory, @"Resources\PageEdit\GridLine.png") });
+        }
+
+        /// <summary>
+        /// 页面方向选中事件
+        /// </summary>
+        /// <param name="orientation"></param>
+        private void OrientationChecked(string orientation)
+        {
+            switch (orientation)
+            {
+                //如果宽高不符合条件就对调宽高
+                case "Vertical":
+                    if(Model.height<=Model.width)
+                    {
+                        var temp = Model.height;
+                        Model.height = Model.width;
+                        Model.width = Model.height;
+                    }
+                    break;
+                case "Horizontal":
+                    if (Model.height> Model.width)
+                    {
+                        var temp = Model.height;
+                        Model.height = Model.width;
+                        Model.width = Model.height;
+                    }
+                    break;
+                default:
+                    break;
+            }
         }
 
         private void cancel()
@@ -33,10 +173,12 @@ namespace PDF_Office.ViewModels.Dialog.PageEditDialogs
         private void insert()
         {
             DialogParameters valuePairs = new DialogParameters();
-            //valuePairs.Add(ParameterNames.DataModel, Model);
+            valuePairs.Add(ParameterNames.DataModel, Model);
             RequestClose.Invoke(new DialogResult(ButtonResult.OK, valuePairs));
         }
 
+        #region 弹窗接口
+
         public bool CanCloseDialog()
         {
             return true;
@@ -49,7 +191,14 @@ namespace PDF_Office.ViewModels.Dialog.PageEditDialogs
 
         public void OnDialogOpened(IDialogParameters parameters)
         {
-           
+            if(parameters!=null)
+            {
+                var size = parameters.GetValue<Size>("CurrentPageSize");
+                CurrentPageSize = $"({size.Width.ToString("F2")}mm*{size.Height.ToString("F2")}mm)";
+                Model.width = (int)size.Width;
+                Model.height = (int)size.Height;
+            }
         }
+        #endregion
     }
 }

+ 64 - 2
PDF Office/ViewModels/Dialog/PageEditDialogs/SplitDialogViewModel.cs

@@ -1,4 +1,9 @@
-using Prism.Commands;
+using ComPDFKitViewer.PdfViewer;
+using PDF_Office.CustomControl;
+using PDF_Office.Helper;
+using PDF_Office.Model;
+using PDF_Office.Model.HomePageToolsDialogs;
+using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Services.Dialogs;
 using System;
@@ -13,6 +18,44 @@ namespace PDF_Office.ViewModels.Dialog.PageEditDialogs
     {
         public string Title => "";
 
+        private CPDFViewer pdfViewer; 
+
+        private double pageCount;
+        //页面总数
+        public double PageCount
+        {
+            get { return pageCount; }
+            set
+            {
+                SetProperty(ref pageCount, value);
+            }
+        }
+
+        private string customPageText;
+        /// <summary>
+        /// 自定义的输入内容
+        /// </summary>
+        public string CustomPageText 
+        {
+            get { return customPageText; }
+            set
+            {
+                SetProperty(ref customPageText, value);
+            }
+        }
+
+
+        private HomePageSplitDialogModel model;
+
+        public HomePageSplitDialogModel Model
+        {
+            get { return model; }
+            set
+            {
+                SetProperty(ref model, value);
+            }
+        }
+
         public event Action<IDialogResult> RequestClose;
 
         public DelegateCommand CancelCommand { get; set; }
@@ -23,6 +66,8 @@ namespace PDF_Office.ViewModels.Dialog.PageEditDialogs
         {
             CancelCommand = new DelegateCommand(cancel);
             SplitCommnad = new DelegateCommand(split);
+
+            Model = new HomePageSplitDialogModel();
         }
         private void cancel()
         {
@@ -31,11 +76,22 @@ namespace PDF_Office.ViewModels.Dialog.PageEditDialogs
 
         private void split()
         {
+            List<int> pages = new List<int>();
+            var result = CommonHelper.GetPagesInRange(ref pages,CustomPageText,(int)pageCount,new char[]{ '-'},new char[] { ','});
+            if(!result)
+            {
+                AlertsMessage alertsMessage = new AlertsMessage();
+                alertsMessage.ShowDialog("","请输入有效范围","OK");
+                return;
+            }
+            Model.PageRange = customPageText;
             DialogParameters valuePairs = new DialogParameters();
+            valuePairs.Add(ParameterNames.DataModel,Model);
             RequestClose.Invoke(new DialogResult(ButtonResult.OK, valuePairs));
         }
 
 
+        #region
         public bool CanCloseDialog()
         {
             return true;
@@ -48,7 +104,13 @@ namespace PDF_Office.ViewModels.Dialog.PageEditDialogs
 
         public void OnDialogOpened(IDialogParameters parameters)
         {
-            
+            parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer,out pdfViewer);
+            if(pdfViewer!=null)
+            {
+                PageCount = pdfViewer.Document.PageCount;
+                Model.SourceFileName = System.IO.Path.GetFileName(pdfViewer.Document.FileName);
+            }
         }
+        #endregion
     }
 }

+ 0 - 0
PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott