Browse Source

PDFAnnotation(windows) - Stamp临时设置、FreeText高保真

liuaoran 1 year ago
parent
commit
be2b81f887
24 changed files with 1057 additions and 193 deletions
  1. 1 0
      .gitignore
  2. 1 0
      compdfkit_demo_windows/compdfkit/annotation-ctrl-demo/MainWindow.xaml
  3. 0 1
      compdfkit_demo_windows/compdfkit/annotation-ctrl-demo/MainWindow.xaml.cs
  4. 3 3
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/CPDFAnnotationPreviewerControl.xaml
  5. 17 3
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/CPDFAnnotationPreviewerControl.xaml.cs
  6. 1 8
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationData/CPDFAnnotationData.cs
  7. 8 2
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs
  8. 2 2
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFFreeTextUI.xaml
  9. 10 1
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFFreeTextUI.xaml.cs
  10. 0 2
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFNoteUI.xaml.cs
  11. 24 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFTempStampUI.xaml
  12. 51 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFTempStampUI.xaml.cs
  13. 7 7
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/BaseControl/DropDownNumberBoxControl.xaml
  14. 5 5
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/BaseControl/NumericUpDownControl.xaml
  15. 616 1
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/Helper/CommonHelper.cs
  16. 1 1
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/ColorPickerControl.xaml
  17. 1 1
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFFont/CPDFFontControl.xaml
  18. 7 3
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFFont/CPDFFontControl.xaml.cs
  19. 152 11
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFFont/CPDFFontUI.xaml
  20. 5 3
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFFont/CPDFFontUI.xaml.cs
  21. 1 1
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFOpacity/CPDFOpactiyUI.xaml
  22. 9 2
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFThickness/CPDThicknessUI.xaml
  23. 7 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/compdfkit-tools.csproj
  24. 128 136
      compdfkit_demo_windows/compdfkit/viewer-ctrl-demo/MainWindow.xaml

+ 1 - 0
.gitignore

@@ -1,4 +1,5 @@
 compdfkit_demo_windows/compdfkit/.vs/
 compdfkit_demo_windows/compdfkit/*/obj/
 compdfkit_demo_windows/compdfkit/*/bin/
+compdfkit_demo_windows/compdfkit/*.htm
 .vs/

+ 1 - 0
compdfkit_demo_windows/compdfkit/annotation-ctrl-demo/MainWindow.xaml

@@ -226,6 +226,7 @@
                     <RowDefinition Height="*"/>
                 </Grid.RowDefinitions>
                 <!--工具栏展开-->
+                
                 <Grid Grid.RowSpan="2" Name="ExpandToolContainer" Visibility="Collapsed">
                     <Grid.RowDefinitions>
                         <RowDefinition Height="auto"></RowDefinition>

+ 0 - 1
compdfkit_demo_windows/compdfkit/annotation-ctrl-demo/MainWindow.xaml.cs

@@ -288,7 +288,6 @@ namespace viewer_ctrl_demo
             }
             ExpandBotaTool(OutlineToolButton.IsChecked == true);
             ClearToolState(OutlineToolButton);
-
         }
         /// <summary>
         /// 设置Bota工具内容

+ 3 - 3
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/CPDFAnnotationPreviewerControl.xaml

@@ -55,9 +55,6 @@
                 <Rectangle x:Name="Rectangle" Width="100" Height="50" Stroke="Red" StrokeThickness="2" Fill="Transparent" Visibility="Collapsed"/>
                 <Ellipse x:Name="Ellipse" Width="70" Height="70" Stroke="Red" StrokeThickness="2" Fill="Transparent" StrokeDashArray="" Visibility="Collapsed"/>
                 <Path x:Name="Line" Stroke="Black" StrokeThickness="2" Width="70" Height="70" Visibility="Collapsed">
-                    <Path.Data>
-                        <LineGeometry StartPoint="10,60" EndPoint="60,10"/>
-                    </Path.Data>
                 </Path>
             </Grid>
             <Grid x:Name="NoteGrid"  Visibility="Collapsed">
@@ -67,6 +64,9 @@
                     </Path.Data>
                 </Path>
             </Grid>
+            <Grid x:Name="StampGrid" Visibility="Collapsed">
+                <Image Margin="10" x:Name="StampImage"></Image>
+            </Grid>
         </Grid>
     </Border>
 </UserControl>

+ 17 - 3
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/CPDFAnnotationPreviewerControl.xaml.cs

@@ -16,6 +16,7 @@ using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
+using static compdfkit_tools.Helper.CommonHelper;
 
 namespace compdfkit_tools.PDFControl
 {
@@ -43,6 +44,7 @@ namespace compdfkit_tools.PDFControl
             Rectangle.Visibility = Visibility.Collapsed;
             Line.Visibility = Visibility.Collapsed;
             NoteGrid.Visibility = Visibility.Collapsed;
+            StampGrid.Visibility = Visibility.Collapsed;
         }
 
         public void DrawMarkUpPreview(CPDFAnnotationData annotationData)
@@ -120,12 +122,17 @@ namespace compdfkit_tools.PDFControl
                     CPDFLineShapeData lineShapeData = annotationData as CPDFLineShapeData;
                     ShapeGrid.Visibility = Visibility.Visible;
                     Line.Visibility = Visibility.Visible;
-
+                    ArrowHelper arrowLine = new ArrowHelper();
+                    arrowLine.ArrowLength = 8;
+                    arrowLine.LineStart = new Point(20, 50);
+                    arrowLine.LineEnd = new Point(50, 20);
+                    arrowLine.StartSharp = lineShapeData.LineType.HeadLineType;
+                    arrowLine.EndSharp = lineShapeData.LineType.TailLineType;
                     Line.Stroke = new SolidColorBrush(lineShapeData.BorderColor);
                     Line.StrokeThickness = lineShapeData.Thickness;
                     Line.Opacity = lineShapeData.Opacity;
-
-
+                    Line.Data = arrowLine.BuildArrowBody();
+                    Line.StrokeDashArray = lineShapeData.DashStyle.Dashes;
                     break;
             }
         }
@@ -149,6 +156,13 @@ namespace compdfkit_tools.PDFControl
             NotePath.Fill = new SolidColorBrush(noteData.BorderColor);
         }
 
+        public void DrawStampPreview(WriteableBitmap writeableBitmap)
+        {
+            CollapsedAll();
+            StampGrid.Visibility = Visibility.Visible;
+            StampImage.Source = writeableBitmap;
+        }
+
         public void InitWithAnnotationData(CPDFAnnotationData annotationData)
         {
             CollapsedAll();

+ 1 - 8
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationData/CPDFAnnotationData.cs

@@ -164,14 +164,7 @@ namespace compdfkit_tools.Data
     {
         public Color BorderColor = Color.FromRgb(255, 0, 0);
         public double Opacity = 1;
-        public CPDFFontData Font = new CPDFFontData()
-        {
-            FontFamily = "Helvetica",
-            FontSize = 12,
-            IsBold = false,
-            IsItalic = false,
-            TextAlignment = TextAlignment.Left
-        };
+        public CPDFFontData Font = new CPDFFontData();
     }
 
     public class CPDFNoteData : CPDFAnnotationData

+ 8 - 2
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs

@@ -289,7 +289,7 @@ namespace compdfkit_tools.PDFControl
                     CPDFFreeTextData freeTextData = pdfAnnotationData as CPDFFreeTextData;
                     annotHandlerEventArgs = new FreeTextAnnotArgs();
                     (annotHandlerEventArgs as FreeTextAnnotArgs).Transparency = freeTextData.Opacity;
-                    (annotHandlerEventArgs as FreeTextAnnotArgs).FontName = freeTextData.Font.FontFamily;
+                    (annotHandlerEventArgs as FreeTextAnnotArgs).FontName = freeTextData.Font.FontFamily.ToString();
                     (annotHandlerEventArgs as FreeTextAnnotArgs).FontColor = freeTextData.BorderColor;
                     (annotHandlerEventArgs as FreeTextAnnotArgs).IsBold = freeTextData.Font.IsBold;
                     (annotHandlerEventArgs as FreeTextAnnotArgs).IsItalic = freeTextData.Font.IsItalic;
@@ -586,16 +586,22 @@ namespace compdfkit_tools.PDFControl
                     tempAnnotationPanel = new CPDFFreehandUI();
                     (tempAnnotationPanel as CPDFFreehandUI).SetPresentAnnotAttrib(annotAttribEvent);
                     break;
+
                 case AnnotArgsType.AnnotFreeText:
                     tempAnnotationPanel = new CPDFFreeTextUI();
+                    (tempAnnotationPanel as CPDFFreeTextUI).SetPresentAnnotAttrib(annotAttribEvent);
                     break;
+                
                 case AnnotArgsType.AnnotSticky:
                     tempAnnotationPanel = new CPDFNoteUI();
                     (tempAnnotationPanel as CPDFNoteUI).SetPresentAnnotAttrib(annotAttribEvent);
                     break;
+                
                 case AnnotArgsType.AnnotStamp:
-                    tempAnnotationPanel = new CPDFStampUI();
+                    tempAnnotationPanel = new CPDFTempStampUI();
+                    (tempAnnotationPanel as CPDFTempStampUI).SetPresentAnnotAttrib(annotAttribEvent);
                     break;
+                
                 default:
                     break;
             }

+ 2 - 2
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFFreeTextUI.xaml

@@ -22,9 +22,9 @@
                 <TextBlock Text="Opacity"></TextBlock>
                 <cpdfcommon:CPDFOpacityControl x:Name="CPDFOpacityControl"></cpdfcommon:CPDFOpacityControl>
             </StackPanel>
-            <StackPanel Height="100" Margin="5">
+            <StackPanel Height="120" Margin="5">
                 <TextBlock Text="Font Style"></TextBlock>
-                <cpdfcommon:CPDFFontControl x:Name="CPDFFontControl"></cpdfcommon:CPDFFontControl>
+                <cpdfcommon:CPDFFontControl x:Name="CPDFFontControl" Width="228"></cpdfcommon:CPDFFontControl>
             </StackPanel>
             <StackPanel Height="200" Margin="5">
                 <TextBlock Text="Note"></TextBlock>

+ 10 - 1
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFFreeTextUI.xaml.cs

@@ -57,9 +57,18 @@ namespace compdfkit_tools.PDFControlUI
             this.annotAttribEvent = null;
             ColorPickerControl.Brush = new SolidColorBrush((Color)annotAttribEvent.Attribs[AnnotAttrib.Color]);
             CPDFOpacityControl.OpacityValue = (int)((double)annotAttribEvent.Attribs[AnnotAttrib.Transparency] * 100);
+            CPDFFontData pdfFontData = new CPDFFontData();
+            
+            pdfFontData.FontFamily = (string)annotAttribEvent.Attribs[AnnotAttrib.FontName];
+            pdfFontData.FontSize = Convert.ToInt16(annotAttribEvent.Attribs[AnnotAttrib.FontSize]);
+            pdfFontData.IsItalic = (bool)annotAttribEvent.Attribs[AnnotAttrib.IsItalic];
+            pdfFontData.IsBold = (bool)annotAttribEvent.Attribs[AnnotAttrib.IsBold];
+            pdfFontData.TextAlignment = (TextAlignment)annotAttribEvent.Attribs[AnnotAttrib.TextAlign];
+
+            CPDFFontControl.CPDFFontData = pdfFontData; 
+
             NoteTextBox.Text = (string)annotAttribEvent.Attribs[AnnotAttrib.NoteText];
             this.annotAttribEvent = annotAttribEvent;
-
         }
 
         public CPDFFreeTextData GetFreeTextData()

+ 0 - 2
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFNoteUI.xaml.cs

@@ -77,7 +77,5 @@ namespace compdfkit_tools.PDFControlUI
             pdfNoteData.Note = NoteTextBox.Text;
             return  pdfNoteData;
         }
-
-
     }
 }

+ 24 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFTempStampUI.xaml

@@ -0,0 +1,24 @@
+<UserControl x:Class="compdfkit_tools.PDFControlUI.CPDFTempStampUI"
+             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:cpdftools="clr-namespace:compdfkit_tools.PDFControl"
+             xmlns:local="clr-namespace:compdfkit_tools.PDFControlUI"
+             mc:Ignorable="d" 
+             d:DesignHeight="800" d:DesignWidth="300">
+    <Grid>
+        <StackPanel Orientation="Vertical">
+            <StackPanel Orientation="Vertical" Height="150">
+                <TextBlock x:Name="TitileTextBlock" Text="Stamp" HorizontalAlignment="Center"></TextBlock>
+                <cpdftools:CPDFAnnotationPreviewerControl x:Name="CPDFAnnotationPreviewerControl" Height="100" Margin="16">
+                </cpdftools:CPDFAnnotationPreviewerControl>
+            </StackPanel>
+            
+            <StackPanel Height="200" Margin="5">
+                <TextBlock Text="Note"></TextBlock>
+                <TextBox Height="150"  x:Name="NoteTextBox" TextChanged="NoteTextBox_TextChanged"></TextBox>
+            </StackPanel>
+        </StackPanel>   
+    </Grid>
+</UserControl>

+ 51 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFTempStampUI.xaml.cs

@@ -0,0 +1,51 @@
+using compdfkit_tools.Common;
+using ComPDFKitViewer.AnnotEvent;
+using ComPDFKitViewer;
+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 compdfkit_tools.PDFControlUI
+{
+    /// <summary>
+    /// CPDFImageUI.xaml 的交互逻辑
+    /// </summary>
+    public partial class CPDFTempStampUI : UserControl
+    {
+        private AnnotAttribEvent annotAttribEvent;
+
+        public CPDFTempStampUI()
+        {
+            InitializeComponent();
+        }
+
+        public void SetPresentAnnotAttrib(AnnotAttribEvent annotAttribEvent)
+        {
+            this.annotAttribEvent = null;
+            NoteTextBox.Text = (string)annotAttribEvent.Attribs[AnnotAttrib.NoteText];
+            this.annotAttribEvent = annotAttribEvent;
+            WriteableBitmap writeableBitmap = (annotAttribEvent.GetAnnotHandlerEventArgs(AnnotArgsType.AnnotStamp)[0] as StampAnnotArgs).GetStampDrawing();
+            CPDFAnnotationPreviewerControl.DrawStampPreview(writeableBitmap);
+        }
+
+        private void NoteTextBox_TextChanged(object sender, TextChangedEventArgs e)
+        {
+            if(annotAttribEvent != null)
+            {
+                annotAttribEvent.UpdateAttrib(AnnotAttrib.NoteText, NoteTextBox.Text);
+                annotAttribEvent.UpdateAnnot();
+            }
+        }
+    }
+}

File diff suppressed because it is too large
+ 7 - 7
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/BaseControl/DropDownNumberBoxControl.xaml


File diff suppressed because it is too large
+ 5 - 5
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/BaseControl/NumericUpDownControl.xaml


+ 616 - 1
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/Helper/CommonHelper.cs

@@ -1,10 +1,12 @@
-using Microsoft.Win32;
+using ComPDFKit.PDFAnnotation;
+using Microsoft.Win32;
 using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows;
 using System.Windows.Media;
 
 namespace compdfkit_tools.Helper
@@ -73,5 +75,618 @@ namespace compdfkit_tools.Helper
             }
             return selectedFilePath;
         }
+
+        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;
+            }
+        }
     }
 }

+ 1 - 1
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/ColorPickerControl.xaml

@@ -150,7 +150,7 @@
             <ColumnDefinition></ColumnDefinition>
             <ColumnDefinition Width="2*"></ColumnDefinition>
         </Grid.ColumnDefinitions>
-        <RadioButton  Background="Transparent" Style="{StaticResource TransparentRadioButton}" Tag="Red" Click="ColorRadioButton_Click" Visibility="{Binding TransparentBtnProperty, RelativeSource={RelativeSource AncestorType={x:Type local:ColorPickerControl}},Mode=TwoWay}"></RadioButton>
+        <RadioButton  Background="Transparent" Style="{StaticResource TransparentRadioButton}" Tag="Transparent" Click="ColorRadioButton_Click" Visibility="{Binding TransparentBtnProperty, RelativeSource={RelativeSource AncestorType={x:Type local:ColorPickerControl}},Mode=TwoWay}"></RadioButton>
         <RadioButton  Background="#FF0000" Grid.Column="1" Style="{StaticResource CommonColorRadioButton}" Tag="Red" Click="ColorRadioButton_Click" Visibility="Visible"></RadioButton>
         <RadioButton  Background="#FFEC66" Grid.Column="2" Style="{StaticResource CommonColorRadioButton}" Tag="Black" Click="ColorRadioButton_Click"></RadioButton>
         <RadioButton  Background="#2D77FA" Grid.Column="3" Style="{StaticResource CommonColorRadioButton}" Tag="Green"  Click="ColorRadioButton_Click"></RadioButton>

+ 1 - 1
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFFont/CPDFFontControl.xaml

@@ -5,7 +5,7 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:compdfkit_tools.Common"
              mc:Ignorable="d" 
-             d:DesignHeight="80" d:DesignWidth="300">
+             d:DesignHeight="80" d:DesignWidth="228">
     <Grid>
         <local:CPDFFontUI x:Name="CPDFFontUI"></local:CPDFFontUI>
     </Grid>

+ 7 - 3
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFFont/CPDFFontControl.xaml.cs

@@ -21,11 +21,15 @@ namespace compdfkit_tools.Common
     /// </summary>
     public partial class CPDFFontControl : UserControl
     {
+        private CPDFFontData _pdfFontData = new CPDFFontData();
         public CPDFFontData CPDFFontData
         {
-            get;
-           private set;
-        } = new CPDFFontData();
+            get => _pdfFontData;
+            set
+            {
+
+            }
+        }
 
         public event EventHandler FontChanged;
         public CPDFFontControl()

+ 152 - 11
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFFont/CPDFFontUI.xaml

@@ -5,26 +5,167 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:compdfkit_tools.Common"
              mc:Ignorable="d" 
-             d:DesignHeight="80" d:DesignWidth="300">
+             d:DesignHeight="120" d:DesignWidth="228">
+    <UserControl.Resources>
+        <Style x:Key="GreyBgRadioBtnStyle" TargetType="{x:Type RadioButton}">
+            <Setter Property="BorderThickness" Value="1" />
+            <Setter Property="Foreground" Value="#252629" />
+            <Setter Property="Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="{x:Type RadioButton}">
+                        <Border
+                        x:Name="templateRoot"
+                        Background="{TemplateBinding Background}"
+                        SnapsToDevicePixels="True">
+                            <ContentPresenter
+                            x:Name="contentPresenter"
+                            Grid.Column="1"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                        </Border>
+                        <ControlTemplate.Triggers>
+                            <Trigger Property="IsEnabled" Value="false">
+                                <Setter TargetName="templateRoot" Property="Opacity" Value="0.5" />
+                            </Trigger>
+                            <Trigger Property="IsMouseOver" Value="True">
+                                <Setter Property="Background" Value="#294982E6"></Setter>
+                            </Trigger>
+                            <Trigger Property="IsPressed" Value="true">
+                                <Setter Property="Background" Value="#604982E6"></Setter>
+                            </Trigger>
+                            <Trigger Property="IsChecked" Value="true">
+                                <Setter Property="Background" Value="#294982E6"></Setter>
+                            </Trigger>
+                        </ControlTemplate.Triggers>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+        </Style>
+    </UserControl.Resources>
     <Grid>
         <Grid.RowDefinitions>
             <RowDefinition></RowDefinition>
             <RowDefinition></RowDefinition>
             <RowDefinition></RowDefinition>
         </Grid.RowDefinitions>
-        <ComboBox x:Name="FontFamilyComboBox" SelectionChanged="FontFamilyComboBox_SelectionChanged"> </ComboBox>
-        <Grid Grid.Row="1">
+        <Grid>
+            <ComboBox x:Name="FontFamilyComboBox" SelectionChanged="FontFamilyComboBox_SelectionChanged" Width="228" Height="28" Margin="0,0,0,4"></ComboBox>
+            <TextBox x:Name="FontFamilyTextBox" IsHitTestVisible="False" Width="228" Height="28" VerticalContentAlignment="Center" IsReadOnly="True" Background="#FFFFFF" Padding="0,0,15,0" Margin="0,0,0,4">Helvetica</TextBox>
+            <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
+                <Path.Data>
+                    M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
+                </Path.Data>
+            </Path>
+        </Grid>
+        <Grid Grid.Row="1" Margin="0,4,0,0">
             <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="2*"></ColumnDefinition>
+                <ColumnDefinition Width="auto"></ColumnDefinition>
                 <ColumnDefinition></ColumnDefinition>
             </Grid.ColumnDefinitions>
-            <ComboBox x:Name="FontStyleComboBox" SelectionChanged="FontStyleComboBox_SelectionChanged"></ComboBox>
-            <local:DropDownNumberBoxControl x:Name="FontSizeComboBox" Maxium="100" Minimum="1" Grid.Column="1" Unit="pt" Text="{Binding FontSizeValue,Mode=TwoWay}"></local:DropDownNumberBoxControl>
+            <Grid Margin="0,0,8,0">
+                <ComboBox x:Name="FontStyleComboBox" SelectionChanged="FontStyleComboBox_SelectionChanged" Width="148" Height="28" BorderBrush="#1E000000" ></ComboBox>
+                <TextBox x:Name="FontStyleTextBox" IsHitTestVisible="False" Width="148" Height="28" VerticalContentAlignment="Center" IsReadOnly="True" Background="#FFFFFF" Padding="0,0,15,0" >Common</TextBox>
+                <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
+                    <Path.Data>
+                        M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
+                    </Path.Data>
+                </Path>
+            </Grid>
+
+            <local:DropDownNumberBoxControl x:Name="FontSizeComboBox" Maxium="100" Minimum="1" Grid.Column="1" Width="72" Height="28" Unit="pt" Text="{Binding FontSizeValue,Mode=TwoWay}"></local:DropDownNumberBoxControl>
         </Grid>
-        <StackPanel Orientation="Horizontal" Grid.Row="2">
-            <RadioButton x:Name="LeftAlignRadioButton" Content="Left" Tag="Left" IsChecked="True" Checked="AlignRadioButton_Checked"></RadioButton>
-            <RadioButton x:Name="CenterAlignRadioButton" Content="Center" Tag="Center" Checked="AlignRadioButton_Checked"></RadioButton>
-            <RadioButton x:Name="RightAlignRadioButton" Content="Right" Tag="Right" Checked="AlignRadioButton_Checked"></RadioButton>
-        </StackPanel>
+
+        <Border BorderBrush="#E2E3E6" BorderThickness="1"  Width="148"  Grid.Row="2"  HorizontalAlignment="Left" Margin="0,8,0,0">
+
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition></ColumnDefinition>
+                    <ColumnDefinition></ColumnDefinition>
+                    <ColumnDefinition></ColumnDefinition>
+                </Grid.ColumnDefinitions>
+                <RadioButton x:Name="LeftAlignRadioButton" Tag="Left" Style="{StaticResource GreyBgRadioBtnStyle}" IsChecked="True" Checked="AlignRadioButton_Checked">
+                    <RadioButton.Content>
+                        <Grid Width="48" Height="30">
+                            <Canvas Margin="16,10,0,0">
+                                <Rectangle
+                               Width="13"
+                               Height="1.5"
+                               Stroke="#000000"
+                               StrokeThickness="1.5" />
+                                <Rectangle
+                               Canvas.Top="4"
+                               Width="16"
+                               Height="1.5"
+                               Stroke="#000000"
+                               StrokeThickness="1.5" />
+                                <Rectangle
+                               Canvas.Top="8"
+                               Width="12"
+                               Height="1.5"
+                               Stroke="#000000"
+                               StrokeThickness="1.5" />
+                            </Canvas>
+                        </Grid>
+                    </RadioButton.Content>
+                </RadioButton>
+                <RadioButton x:Name="CenterAlignRadioButton" Grid.Column="1" Style="{StaticResource GreyBgRadioBtnStyle}" Tag="Center" Checked="AlignRadioButton_Checked">
+                    <RadioButton.Content>
+                        <Grid Width="48" Height="30">
+                            <Canvas Margin="16,10,0,0">
+                                <Rectangle
+                               Width="16"
+                               Height="1.5"
+                               Stroke="#000000"
+                               StrokeThickness="1.5" />
+                                <Rectangle
+                               Canvas.Top="4"
+                               Width="10"
+                               Height="1.5"
+                               Stroke="#000000"
+                               StrokeThickness="1.5" 
+                                Margin="3,0,0,0"/>
+                                <Rectangle
+                               Canvas.Top="8"
+                               Width="16"
+                               Height="1.5"
+                               Stroke="#000000"
+                               StrokeThickness="1.5" />
+                            </Canvas>
+                        </Grid>
+                    </RadioButton.Content>
+                </RadioButton>
+                <RadioButton x:Name="RightAlignRadioButton" Grid.Column="2" Style="{StaticResource GreyBgRadioBtnStyle}" Tag="Right" Checked="AlignRadioButton_Checked">
+                    <RadioButton.Content >
+                        <Grid Width="48" Height="30">
+                            <Canvas Margin="13,10,0,0">
+                                <Rectangle
+                               Width="13"
+                               Height="1.5"
+                               Stroke="#000000"
+                               StrokeThickness="1.5" 
+                               Margin="3,0,0,0"/>
+                                <Rectangle
+                               Canvas.Top="4"
+                               Width="16"
+                               Height="1.5"
+                               Stroke="#000000"
+                               StrokeThickness="1.5"/>
+                                <Rectangle
+                               Canvas.Top="8"
+                               Width="13"
+                               Height="1.5"
+                               Stroke="#000000"
+                               StrokeThickness="1.5" 
+                               Margin="3,0,0,0"/>
+                            </Canvas>
+                        </Grid>
+                    </RadioButton.Content>
+                </RadioButton>
+            </Grid>
+        </Border>
     </Grid>
 </UserControl>

+ 5 - 3
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFFont/CPDFFontUI.xaml.cs

@@ -104,9 +104,9 @@ namespace compdfkit_tools.Common
         {
             List<string> fontNameList = new List<string>()
             {
-                {"Courier New" },
-                {"Arial" },
-                {"Times Roman" }
+                {"Courier" },
+                {"Helvetica" },
+                {"Times" }
             };
             FontFamilyComboBox.ItemsSource = fontNameList;
             FontFamilyComboBox.SelectedIndex = 1;
@@ -149,11 +149,13 @@ namespace compdfkit_tools.Common
 
         private void FontFamilyComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
+            FontFamilyTextBox.Text = (sender as ComboBox).SelectedItem.ToString();
             FontChanged?.Invoke(this, EventArgs.Empty);
         }
 
         private void FontStyleComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
+            FontStyleComboBox.Text = (sender as ComboBox).SelectedItem.ToString();
             FontChanged?.Invoke(this, EventArgs.Empty);
         }
 

+ 1 - 1
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFOpacity/CPDFOpactiyUI.xaml

@@ -20,6 +20,6 @@
         </Grid.ColumnDefinitions>
         <Slider  Style="{StaticResource SliderStyle}" MinHeight="40" VerticalAlignment="Center" Maximum="100" Minimum="0" TickFrequency="1" 
                  IsSnapToTickEnabled="True" Value="{Binding OpacityValue, Mode=TwoWay}" Margin="10,0,10,0"></Slider>
-        <local:DropDownNumberBoxControl x:Name="DropDownNumberBoxControl"  Grid.Column="1" Unit="%" Maxium="100" Minimum="1" Text="{Binding OpacityValue,Mode=TwoWay}"></local:DropDownNumberBoxControl>
+        <local:DropDownNumberBoxControl x:Name="DropDownNumberBoxControl"  Grid.Column="1" Unit="%" Maxium="100" Minimum="1" Height="28" Width="72" Text="{Binding OpacityValue,Mode=TwoWay}"></local:DropDownNumberBoxControl>
     </Grid>
 </UserControl>

+ 9 - 2
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/PropertyControl/PDFThickness/CPDThicknessUI.xaml

@@ -6,12 +6,19 @@
              xmlns:local="clr-namespace:compdfkit_tools.Common"
              mc:Ignorable="d" 
              d:DesignHeight="40" d:DesignWidth="300">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/SliderStyle.xaml"></ResourceDictionary>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </UserControl.Resources>
     <Grid>
         <Grid.ColumnDefinitions>
             <ColumnDefinition></ColumnDefinition>
             <ColumnDefinition Width="80"></ColumnDefinition>
         </Grid.ColumnDefinitions>
-        <Slider MinHeight="40" VerticalAlignment="Center" Maximum="16" Minimum="1" TickFrequency="1" IsSnapToTickEnabled="True" Value="{Binding Thickness, Mode=TwoWay}" Margin="10,0,10,0"></Slider>
-        <local:DropDownNumberBoxControl x:Name="DropDownNumberBoxControl"  Grid.Column="1" Unit="pt" Maxium="16" Minimum="1" Text="{Binding Thickness,Mode=TwoWay}"></local:DropDownNumberBoxControl>
+        <Slider   Style="{StaticResource SliderStyle}" MinHeight="40" VerticalAlignment="Center" Maximum="16" Minimum="1" TickFrequency="1" IsSnapToTickEnabled="True" Value="{Binding Thickness, Mode=TwoWay}" Margin="10,0,10,0"></Slider>
+        <local:DropDownNumberBoxControl x:Name="DropDownNumberBoxControl"  Grid.Column="1" Unit="pt" Maxium="16" Minimum="1" Text="{Binding Thickness,Mode=TwoWay}" Height="28" Width="72"></local:DropDownNumberBoxControl>
     </Grid>
 </UserControl>

+ 7 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/compdfkit-tools.csproj

@@ -75,6 +75,9 @@
     <Compile Include="Annotation\PDFAnnotationPanel\PDFAnnotationUI\CPDFFreeTextUI.xaml.cs">
       <DependentUpon>CPDFFreeTextUI.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Annotation\PDFAnnotationPanel\PDFAnnotationUI\CPDFTempStampUI.xaml.cs">
+      <DependentUpon>CPDFTempStampUI.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Annotation\PDFAnnotationPanel\PDFAnnotationUI\CPDFNoteUI.xaml.cs">
       <DependentUpon>CPDFNoteUI.xaml</DependentUpon>
     </Compile>
@@ -329,6 +332,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Annotation\PDFAnnotationPanel\PDFAnnotationUI\CPDFTempStampUI.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Annotation\PDFAnnotationPanel\PDFAnnotationUI\CPDFNoteUI.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 128 - 136
compdfkit_demo_windows/compdfkit/viewer-ctrl-demo/MainWindow.xaml

@@ -21,25 +21,24 @@
                 <RowDefinition Height="40"></RowDefinition>
                 <RowDefinition Height="*"></RowDefinition>
             </Grid.RowDefinitions>
+                <!--顶部工具栏-->
+                <Grid>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="auto"></ColumnDefinition>
+                        <ColumnDefinition Width="*"></ColumnDefinition>
+                        <ColumnDefinition Width="auto"></ColumnDefinition>
+                    </Grid.ColumnDefinitions>
 
-            <!--顶部工具栏-->
-            <Grid>
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="auto"></ColumnDefinition>
-                    <ColumnDefinition Width="*"></ColumnDefinition>
-                    <ColumnDefinition Width="auto"></ColumnDefinition>
-                </Grid.ColumnDefinitions>
-
-                <!--左侧工具栏-->
-                <StackPanel Orientation="Horizontal" Height="40" Margin="20,0,0,0">
+                    <!--左侧工具栏-->
+                    <StackPanel Orientation="Horizontal" Height="40" Margin="20,0,0,0">
 
-                    <!--打开文件-->
-                    <Button BorderThickness="0" VerticalContentAlignment="Center" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="OpenFile_Click">
-                        <Button.Content>
-                            <Viewbox Width="20" Height="20">
-                                <Path Fill="#43474D" >
-                                    <Path.Data>
-                                        M3.75,2 L3.91967773,2.00463867 C4.08325195,2.01391602 4.22851562,2.03710938 4.35546875,2.07421875 C4.52473958,2.12369792 
+                        <!--打开文件-->
+                        <Button BorderThickness="0" VerticalContentAlignment="Center" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="OpenFile_Click">
+                            <Button.Content>
+                                <Viewbox Width="20" Height="20">
+                                    <Path Fill="#43474D" >
+                                        <Path.Data>
+                                            M3.75,2 L3.91967773,2.00463867 C4.08325195,2.01391602 4.22851562,2.03710938 4.35546875,2.07421875 C4.52473958,2.12369792 
                                     4.67578125,2.18489583 4.80859375,2.2578125 C4.94140625,2.33072917 5.05989583,2.41145833 5.1640625,2.5 C5.26822917,2.58854167 
                                     5.37369792,2.66927083 5.48046875,2.7421875 C5.58723958,2.81510417 5.70182292,2.87630208 5.82421875,2.92578125 C5.94661458,2.97526042 
                                     6.08854167,3 6.25,3 L6.25,3 L12,3 L12.1371528,3.00868056 C12.2262731,3.02025463 12.3107639,3.04340278 12.390625,3.078125 
@@ -54,46 +53,46 @@
                                     L4.3125,6 L12,6 L12,4 L6.25,4 L6.08032227,3.99536133 C5.91674805,3.98608398 5.77148438,3.96289062 5.64453125,3.92578125 C5.47526042,3.87630208 
                                     5.32421875,3.81510417 5.19140625,3.7421875 C5.05859375,3.66927083 4.94010417,3.58854167 4.8359375,3.5 C4.73177083,3.41145833 4.62630208,3.33072917 
                                     4.51953125,3.2578125 C4.41276042,3.18489583 4.29817708,3.12369792 4.17578125,3.07421875 C4.05338542,3.02473958 3.91145833,3 3.75,3 L3.75,3 Z
-                                    </Path.Data>
-                                </Path>
-                            </Viewbox>
-                        </Button.Content>
-                    </Button>
-                    
-                    <!--保存文件-->
-                    <Button BorderThickness="0" VerticalContentAlignment="Center" Margin="10,0,0,0" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent" 
+                                        </Path.Data>
+                                    </Path>
+                                </Viewbox>
+                            </Button.Content>
+                        </Button>
+
+                        <!--保存文件-->
+                        <Button BorderThickness="0" VerticalContentAlignment="Center" Margin="10,0,0,0" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent" 
                             Click="SaveFileBtn_Click">
-                        <Button.Content>
-                            <Viewbox Width="20" Height="20">
-                                <Path Fill="#43474D" >
-                                    <Path.Data>
-                                        M11.707107,1 L15,4.29289322 L15,15 L1,15 L1,1 L11.707107,1 Z M11.293,2 L2,2 L2,14 L4,14 L4,8 L12,8 L12,14 L14,14 L14,4.707 L11.293,2 Z 
+                            <Button.Content>
+                                <Viewbox Width="20" Height="20">
+                                    <Path Fill="#43474D" >
+                                        <Path.Data>
+                                            M11.707107,1 L15,4.29289322 L15,15 L1,15 L1,1 L11.707107,1 Z M11.293,2 L2,2 L2,14 L4,14 L4,8 L12,8 L12,14 L14,14 L14,4.707 L11.293,2 Z 
                                         M11,9 L5,9 L5,14 L11,14 L11,9 Z M7,5 L7,6 L4,6 L4,5 L7,5 Z
+                                        </Path.Data>
+                                    </Path>
+                                </Viewbox>
+                            </Button.Content>
+                        </Button>
+
+                        <!--工具栏展开收缩-->
+                        <ToggleButton Margin="13,0,0,0" BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="ToolExpand_Click">
+                            <ToggleButton.Content>
+                                <Path Fill="#43474D" Width="30" Height="30">
+                                    <Path.Data>
+                                        M22.5 8.5H7.5V12.25H13H22.5V8.5ZM12.25 13.75H7.5V21.5H12.25V13.75ZM13.75 21.5V13.75H22.5V21.5H13.75ZM7.5 7H6V8.5V21.5V23H7.5H22.5H24V21.5V8.5V7H22.5H7.5Z
                                     </Path.Data>
                                 </Path>
-                            </Viewbox>
-                        </Button.Content>
-                    </Button>
-                    
-                    <!--工具栏展开收缩-->
-                    <ToggleButton Margin="13,0,0,0" BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="ToolExpand_Click">
-                        <ToggleButton.Content>
-                            <Path Fill="#43474D" Width="30" Height="30">
-                                <Path.Data>
-                                    M22.5 8.5H7.5V12.25H13H22.5V8.5ZM12.25 13.75H7.5V21.5H12.25V13.75ZM13.75 21.5V13.75H22.5V21.5H13.75ZM7.5 7H6V8.5V21.5V23H7.5H22.5H24V21.5V8.5V7H22.5H7.5Z
-                                </Path.Data>
-                            </Path>
-                        </ToggleButton.Content>
-                    </ToggleButton>
-
-                    <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
-                    
-                    <!--抓手工具-->
-                    <ToggleButton BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" IsChecked="True" IsEnabled="False" Visibility="Collapsed">
-                        <ToggleButton.Content>
-                            <Path Fill="#43474D">
-                                <Path.Data>
-                                    M8.7463 7.94055L8.43134 3.20358C8.38986 2.6073 8.82031 2.08322 9.40947 2.01273L9.46546 2.00656C9.75502 1.97416 10.0451 2.06271 10.2681 2.25159C10.4911 
+                            </ToggleButton.Content>
+                        </ToggleButton>
+
+                        <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
+
+                        <!--抓手工具-->
+                        <ToggleButton BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" IsChecked="True" IsEnabled="False" Visibility="Collapsed">
+                            <ToggleButton.Content>
+                                <Path Fill="#43474D">
+                                    <Path.Data>
+                                        M8.7463 7.94055L8.43134 3.20358C8.38986 2.6073 8.82031 2.08322 9.40947 2.01273L9.46546 2.00656C9.75502 1.97416 10.0451 2.06271 10.2681 2.25159C10.4911 
                                 2.44047 10.6276 2.71317 10.6457 3.00614L10.9886 8.17061C10.999 8.31659 11.1097 8.43516 11.2537 8.45444C11.3176 8.46288 11.382 8.44409 11.4315 
                                 8.40258C11.481 8.36108 11.5111 8.30063 11.5145 8.23584L11.7612 3.47595C11.7918 2.85998 12.3116 2.38523 12.923 2.41468H12.9309C13.5429 2.44972 
                                 14.0111 2.97745 13.9773 3.59407L13.7218 8.51438C13.7137 8.66679 13.8235 8.79975 13.9738 8.81936C14.1225 8.83876 14.2625 8.73915 14.2914 
@@ -104,104 +103,102 @@
                                 11.8234 5.94227 12.324 6.07526 12.2324C6.27386 12.0949 6.12075 11.7176 5.85478 9.21249C5.67578 7.53039 5.45319 5.85328 5.18724 4.18289C5.07653 3.5968 
                                 5.44002 3.02581 6.01489 2.88273L6.07526 2.86775C6.35866 2.79957 6.65742 2.85178 6.90147 3.01215C7.14552 3.17252 7.3134 3.42693 7.36572 3.71571L8.168 
                                 8.02341C8.19642 8.17613 8.33897 8.27937 8.49171 8.25787C8.64561 8.23564 8.75656 8.09774 8.7463 7.94143V7.94055Z
-                                </Path.Data>
-                            </Path>
-                        </ToggleButton.Content>
-                    </ToggleButton>
+                                    </Path.Data>
+                                </Path>
+                            </ToggleButton.Content>
+                        </ToggleButton>
 
-                    <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
+                        <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
 
-                    <Grid>
-                        <ComboBox Name="ZoomComboBox" VerticalContentAlignment="Center" Width="72" Height="30" Foreground="#43474D" FontSize="14"
+                        <Grid>
+                            <ComboBox Name="ZoomComboBox" VerticalContentAlignment="Center" Width="72" Height="30" Foreground="#43474D" FontSize="14"
                               SelectionChanged="ZoomComboBox_SelectionChanged" BorderBrush="#1E000000">
-                        </ComboBox>
-                        <TextBox Name="ZoomTextBox" IsHitTestVisible="False" Width="72" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
+                            </ComboBox>
+                            <TextBox Name="ZoomTextBox" IsHitTestVisible="False" Width="72" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
                              IsReadOnly="True" Background="White" Padding="0,0,15,0">100%</TextBox>
-                        <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
-                            <Path.Data>
-                                M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
-                            </Path.Data>
-                        </Path>
-                    </Grid>
-
-                    <Button Margin="20,0,0,0" Width="30" Height="30" BorderThickness="0" Background="Transparent" Style="{StaticResource LightButtonStyle}" Click="ZoomOutBtn_Click" >
-                        <Button.Content>
-                            <Rectangle Width="12" Height="2" Fill="#0E1114"></Rectangle>
-                        </Button.Content>
-                    </Button>
-
-                    <Button Margin="10,0,0,0" Width="30" Height="30" BorderThickness="0" Background="Transparent" Style="{StaticResource LightButtonStyle}" Click="ZoomInBtn_Click">
-                        <Button.Content>
-                            <Path Fill="#0E1114">
+                            <Path Fill="#43474D" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0" IsHitTestVisible="False">
                                 <Path.Data>
-                                    M7.625 6.375V0.75H6.375V6.375H0.75V7.625H6.375V13.25H7.625V7.625H13.25V6.375H7.625Z
+                                    M0.5 0.510248L4.5041 5.5L8.5 0.5L0.5 0.510248Z
                                 </Path.Data>
                             </Path>
-                        </Button.Content>
-                    </Button>
+                        </Grid>
 
-                </StackPanel>
+                        <Button Margin="20,0,0,0" Width="30" Height="30" BorderThickness="0" Background="Transparent" Style="{StaticResource LightButtonStyle}" Click="ZoomOutBtn_Click" >
+                            <Button.Content>
+                                <Rectangle Width="12" Height="2" Fill="#0E1114"></Rectangle>
+                            </Button.Content>
+                        </Button>
 
-                <!--中间工具栏-->
-                <ComboBox Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E">
-                    <ComboBoxItem IsSelected="True">Viewer</ComboBoxItem>
-                </ComboBox>
+                        <Button Margin="10,0,0,0" Width="30" Height="30" BorderThickness="0" Background="Transparent" Style="{StaticResource LightButtonStyle}" Click="ZoomInBtn_Click">
+                            <Button.Content>
+                                <Path Fill="#0E1114">
+                                    <Path.Data>
+                                        M7.625 6.375V0.75H6.375V6.375H0.75V7.625H6.375V13.25H7.625V7.625H13.25V6.375H7.625Z
+                                    </Path.Data>
+                                </Path>
+                            </Button.Content>
+                        </Button>
 
-                <!--右侧工具栏-->
-                <StackPanel Orientation="Horizontal" Grid.Column="2">
+                    </StackPanel>
 
-                    <!--搜索按钮-->
-                    <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="ExpandSearchBtn_Click">
-                        <Button.Content>
-                            <Path Fill="#43474D">
-                                <Path.Data>
-                                    M5.10992 13.9353C2.71184 11.5372 2.71184 7.64917 5.10992 5.25108C7.50801 2.853 11.3961 2.853 13.7942 5.25108C16.1922 7.64917 
+                    <!--中间工具栏-->
+                    <ComboBox Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E">
+                        <ComboBoxItem IsSelected="True">Viewer</ComboBoxItem>
+                    </ComboBox>
+
+                    <!--右侧工具栏-->
+                    <StackPanel Orientation="Horizontal" Grid.Column="2">
+
+                        <!--搜索按钮-->
+                        <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="ExpandSearchBtn_Click">
+                            <Button.Content>
+                                <Path Fill="#43474D">
+                                    <Path.Data>
+                                        M5.10992 13.9353C2.71184 11.5372 2.71184 7.64917 5.10992 5.25108C7.50801 2.853 11.3961 2.853 13.7942 5.25108C16.1922 7.64917 
                                 16.1922 11.5372 13.7942 13.9353C11.3961 16.3334 7.50801 16.3334 5.10992 13.9353ZM4.04926 4.19042C1.06539 7.17429 1.06539 12.0121 
                                 4.04926 14.996C6.85422 17.8009 11.2975 17.9691 14.2989 15.5005L17.1989 18.4006C17.4918 18.6935 17.9667 18.6935 18.2596 
                                 18.4006C18.5525 18.1077 18.5525 17.6328 18.2596 17.3399L15.3595 14.4399C17.828 11.4384 17.6597 6.99533 14.8548 
                                 4.19042C11.8709 1.20655 7.03313 1.20655 4.04926 4.19042Z
-                                </Path.Data>
-                            </Path>
-                        </Button.Content>
-                    </Button>
+                                    </Path.Data>
+                                </Path>
+                            </Button.Content>
+                        </Button>
 
-                    <!--页面显示-->
-                    <ToggleButton BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="ViewSettingBtn_Click">
-                        <ToggleButton.Content>
-                            <Path Stroke="#43474D" VerticalAlignment="Center" StrokeThickness="2">
-                                <Path.Data>
-                                    <CombinedGeometry GeometryCombineMode="Exclude">
-                                        <CombinedGeometry.Geometry1>
-                                            M18.3327 10C18.3327 10 14.6017 16.25 9.99935 16.25C5.39698 16.25 1.66602 10 1.66602 10C1.66602 10 5.39698 3.75 9.99935 3.75C14.6017 3.75 18.3327 10 18.3327 10Z
-                                        </CombinedGeometry.Geometry1>
-                                        <CombinedGeometry.Geometry2>
-                                            <EllipseGeometry Center="10,10" RadiusX="2" RadiusY="2"/>
-                                        </CombinedGeometry.Geometry2>
-                                    </CombinedGeometry>
-                                </Path.Data>
-                            </Path>
-                        </ToggleButton.Content>
-                    </ToggleButton>
+                        <!--页面显示-->
+                        <ToggleButton BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" Click="ViewSettingBtn_Click">
+                            <ToggleButton.Content>
+                                <Path Stroke="#43474D" VerticalAlignment="Center" StrokeThickness="2">
+                                    <Path.Data>
+                                        <CombinedGeometry GeometryCombineMode="Exclude">
+                                            <CombinedGeometry.Geometry1>
+                                                M18.3327 10C18.3327 10 14.6017 16.25 9.99935 16.25C5.39698 16.25 1.66602 10 1.66602 10C1.66602 10 5.39698 3.75 9.99935 3.75C14.6017 3.75 18.3327 10 18.3327 10Z
+                                            </CombinedGeometry.Geometry1>
+                                            <CombinedGeometry.Geometry2>
+                                                <EllipseGeometry Center="10,10" RadiusX="2" RadiusY="2"/>
+                                            </CombinedGeometry.Geometry2>
+                                        </CombinedGeometry>
+                                    </Path.Data>
+                                </Path>
+                            </ToggleButton.Content>
+                        </ToggleButton>
 
-                    <!--页面信息-->
-                    <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="PageInfoBtn_Click">
-                        <Button.Content>
-                            <Path Fill="#43474D" VerticalAlignment="Center">
-                                <Path.Data>
-                                    M2.75 10C2.75 5.99594 5.99594 2.75 10 2.75C14.0041 2.75 17.25 5.99594 17.25 10C17.25 14.0041 14.0041 17.25 10 
+                        <!--页面信息-->
+                        <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent" Click="PageInfoBtn_Click">
+                            <Button.Content>
+                                <Path Fill="#43474D" VerticalAlignment="Center">
+                                    <Path.Data>
+                                        M2.75 10C2.75 5.99594 5.99594 2.75 10 2.75C14.0041 2.75 17.25 5.99594 17.25 10C17.25 14.0041 14.0041 17.25 10 
                                 17.25C5.99594 17.25 2.75 14.0041 2.75 10ZM10 1.25C5.16751 1.25 1.25 5.16751 1.25 10C1.25 14.8325 5.16751 
                                 18.75 10 18.75C14.8325 18.75 18.75 14.8325 18.75 10C18.75 5.16751 14.8325 1.25 10 1.25ZM6.5 11C7.05228 11 
                                 7.5 10.5523 7.5 10C7.5 9.44771 7.05228 9 6.5 9C5.94772 9 5.5 9.44771 5.5 10C5.5 10.5523 5.94772 11 6.5 11ZM10 
                                 11C10.5523 11 11 10.5523 11 10C11 9.44771 10.5523 9 10 9C9.44771 9 9 9.44771 9 10C9 10.5523 9.44771 11 10 11ZM14.5 
                                 10C14.5 10.5523 14.0523 11 13.5 11C12.9477 11 12.5 10.5523 12.5 10C12.5 9.44771 12.9477 9 13.5 9C14.0523 9 14.5 9.44771 14.5 10Z
-                                </Path.Data>
-                            </Path>
-                        </Button.Content>
-                    </Button>
-                </StackPanel>
-
-            </Grid>
-
+                                    </Path.Data>
+                                </Path>
+                            </Button.Content>
+                        </Button>
+                    </StackPanel>
+                </Grid>
             <Grid Name="BodyGrid" Grid.Row="1">
                 <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="0"></ColumnDefinition>
@@ -218,7 +215,6 @@
                     </Grid.RowDefinitions>
 
                     <StackPanel Name="BotaSideTool" Background="{StaticResource color.bg.jumpbar}" Orientation="Horizontal">
-
                         <!--缩略图-->
                         <ToggleButton Name="ThumbToolButton"  Height="40" Width="65" BorderThickness="0"  Style="{StaticResource ToggleButtonStyle}" Click="ThumbToolButton_Click" >
                             <ToggleButton.Content>
@@ -252,7 +248,6 @@
                                 </Path>
                             </ToggleButton.Content>
                         </ToggleButton>
-
                         <!--文字搜索-->
                         <ToggleButton Name="SearchToolButton" Height="40" Width="65" BorderThickness="0"  Style="{StaticResource ToggleButtonStyle}" Click="SearchToolButton_Click">
                             <ToggleButton.Content>
@@ -266,11 +261,8 @@
                                 </Path>
                             </ToggleButton.Content>
                         </ToggleButton>
-
                     </StackPanel>
-
                     <Border Grid.Row="1" Name="BotaToolContainer">
-
                     </Border>
                 </Grid>
 
@@ -345,7 +337,7 @@
 
         <Border Name="PopupBorder" Background="#A0000000" Visibility="Collapsed">
             <Grid>
-                
+
                 <!--文件信息-->
                 <Grid Name="FileInfoUI"  Width="422" Height="680" HorizontalAlignment="Center" VerticalAlignment="Center" Background="White" Visibility="Collapsed">
                     <Grid.ColumnDefinitions>
@@ -369,7 +361,7 @@
                     </Button>
                     <cpdftools:CPDFInfoControl Grid.Row="1" Margin="25,10,25,0" Grid.ColumnSpan="2" Name="FileInfoControl"></cpdftools:CPDFInfoControl>
                 </Grid>
-                
+
                 <!--密码验证-->
                 <local:PasswordDialog x:Name="PasswordUI" Visibility="Collapsed"></local:PasswordDialog>
             </Grid>