Browse Source

PDFAnnotation(windows) - UI走查问题

liuaoran 1 year ago
parent
commit
92aa795e81
14 changed files with 160 additions and 34 deletions
  1. 3 2
      compdfkit_demo_windows/compdfkit/annotation-ctrl-demo/MainWindow.xaml
  2. 3 3
      compdfkit_demo_windows/compdfkit/annotation-ctrl-demo/MainWindow.xaml.cs
  3. 16 4
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/CPDFAnnotationPreviewerControl.xaml.cs
  4. 4 2
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs
  5. 7 6
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml
  6. 2 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml.cs
  7. 1 1
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml
  8. 3 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml.cs
  9. 1 1
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Edit/PDFTextEdit/PDFTextEditControl/PDFTextEditControl.xaml
  10. 1 1
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Edit/PDFTextEdit/PDFTextEditUI/CPDFTextStyleUI.xaml
  11. 2 2
      compdfkit_demo_windows/compdfkit/compdfkit-tools/PDFView/PDFScaling/PDFScalingControl/CPDFScalingControl.xaml
  12. 27 10
      compdfkit_demo_windows/compdfkit/compdfkit-tools/PDFView/PDFScaling/PDFScalingUI/CPDFScalingUI.xaml
  13. 79 1
      compdfkit_demo_windows/compdfkit/compdfkit/MainWindow.xaml
  14. 11 1
      compdfkit_demo_windows/compdfkit/compdfkit/compdfkit.csproj

+ 3 - 2
compdfkit_demo_windows/compdfkit/annotation-ctrl-demo/MainWindow.xaml

@@ -146,7 +146,7 @@
 
                 <!--中间工具栏-->
                 <ComboBox Style="{StaticResource ComboBoxStyle1}" Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E" SelectionChanged="ComboBox_SelectionChanged">
-                    <!--<ComboBoxItem IsSelected="True" Tag="Viewer">Viewer</ComboBoxItem>-->
+                    <ComboBoxItem IsSelected="True" Tag="Viewer">Viewer</ComboBoxItem>
                     <ComboBoxItem IsSelected="True" Tag="Annotation">Annotation</ComboBoxItem>
                 </ComboBox>
 
@@ -323,7 +323,9 @@
                         <RowDefinition Height="auto"/>
                         <RowDefinition Height="*"/>
                     </Grid.RowDefinitions>
+                   
                     <cpdftools:CPDFAnnotationBarControl x:Name="AnnotationBarControl" Loaded="AnnotationBarControl_Loaded" Unloaded="AnnotationBarControl_Unloaded" Grid.ColumnSpan="2" Height="44"/>
+                   
                     <Grid Grid.Row="1">
                         <Grid.ColumnDefinitions>
                             <ColumnDefinition></ColumnDefinition>
@@ -333,7 +335,6 @@
                         <Border x:Name="PDFGrid" Background="{StaticResource color.bg.mainpage}"></Border>
                         <!--右侧面板-->
                         <Border Grid.Column="1" Grid.RowSpan="2" Name="PropertyContainer" Visibility="Collapsed"></Border>
-
                     </Grid>
                     
                     <!--页码工具-->

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

@@ -745,7 +745,6 @@ namespace viewer_ctrl_demo
                 }
             }
         }
-
         #region Annotation
 
         public void InitialPDFViewControl(PDFViewControl newPDFViewer)
@@ -853,8 +852,9 @@ namespace viewer_ctrl_demo
             {
                 AnnotationBarControl.ClearAllToolState();
                 AnnotationBarControl.Visibility = Visibility.Collapsed;
-                pdfAnnotationControl.ClearPanel();
-                
+                ExpandRightPropertyPanel(null, Visibility.Collapsed);
+                pdfAnnotationControl.AnnotationCancel();
+                AnnotationBarBtn.IsChecked = false;
             }
             else if ((string)item.Content == "Annotation")
             {

+ 16 - 4
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/CPDFAnnotationPreviewerControl.xaml.cs

@@ -99,7 +99,12 @@ namespace compdfkit_tools.PDFControl
                     Ellipse.Opacity = circleData.Opacity;
                     Ellipse.Fill = new SolidColorBrush(circleData.FillColor);
                     Ellipse.Stroke = new SolidColorBrush(circleData.BorderColor);
-                    Ellipse.StrokeDashArray = circleData.DashStyle.Dashes;
+                    if (circleData.DashStyle.Dashes.Count == 2)
+                    {
+                        Ellipse.StrokeDashArray.Add(circleData.DashStyle.Dashes[0] / Math.Max(Ellipse.StrokeThickness, 1));
+                        Ellipse.StrokeDashArray.Add(circleData.DashStyle.Dashes[1] / Math.Max(Ellipse.StrokeThickness, 1));
+                    }
+                  
                     break;
 
                 case CPDFAnnotationType.Square:
@@ -111,8 +116,11 @@ namespace compdfkit_tools.PDFControl
                     Rectangle.Opacity = squareData.Opacity;
                     Rectangle.Fill = new SolidColorBrush(squareData.FillColor);
                     Rectangle.Stroke = new SolidColorBrush(squareData.BorderColor);
-                    Rectangle.StrokeDashArray = squareData.DashStyle.Dashes;
-
+                    if (squareData.DashStyle.Dashes.Count == 2)
+                    {
+                        Rectangle.StrokeDashArray.Add(squareData.DashStyle.Dashes[0] / Math.Max(Rectangle.StrokeThickness, 1));
+                        Rectangle.StrokeDashArray.Add(squareData.DashStyle.Dashes[1] / Math.Max(Rectangle.StrokeThickness, 1));
+                    }
                     break;
 
                 case CPDFAnnotationType.Line:
@@ -131,7 +139,11 @@ namespace compdfkit_tools.PDFControl
                     Line.StrokeThickness = lineShapeData.Thickness;
                     Line.Opacity = lineShapeData.Opacity;
                     Line.Data = arrowLine.BuildArrowBody();
-                    Line.StrokeDashArray = lineShapeData.DashStyle.Dashes;
+                    if (lineShapeData.DashStyle.Dashes.Count == 2)
+                    {
+                        Line.StrokeDashArray.Add(lineShapeData.DashStyle.Dashes[0] / Math.Max(Line.StrokeThickness, 1));
+                        Line.StrokeDashArray.Add(lineShapeData.DashStyle.Dashes[1] / Math.Max(Line.StrokeThickness, 1));
+                    }
                     break;
             }
         }

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

@@ -72,20 +72,22 @@ namespace compdfkit_tools.PDFControl
             this.pdfViewer = pdfViewer;
             LoadPDFViewHandler();
         }
-        private void LoadPDFViewHandler()
+        public void LoadPDFViewHandler()
         {
             if (this.pdfViewer != null)
             {
+                this.pdfViewer.AnnotActiveHandler -= PDFViewer_AnnotActiveHandler;
                 this.pdfViewer.AnnotActiveHandler += PDFViewer_AnnotActiveHandler;
             }
         }
 
 
-        private void UnLoadPDFViewHandler()
+        public void UnLoadPDFViewHandler()
         {
             if (this.pdfViewer != null)
             {
                 this.pdfViewer.AnnotActiveHandler -= PDFViewer_AnnotActiveHandler;
+                
             }
         }
 

+ 7 - 6
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml

@@ -343,9 +343,9 @@
                         <InkCanvas x:Name="DrawinkCanvas" Loaded="DrawinkCanvas_Loaded" Unloaded="DrawinkCanvas_Unloaded" Background="#F2F3F5" Grid.ColumnSpan="2" Margin="0,0,0,-10" />
                     </Grid>
                     <StackPanel Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" Orientation="Horizontal">
-                    <TextBlock Text="Width"  VerticalAlignment="Center" />
-                    <Slider  x:Name="StrokeWidthSlider" Width="96" Margin="12,0,0,0" Value="4" VerticalAlignment="Center" ValueChanged="StrokeWidth_ValueChanged"/>
-                    <TextBox Text="{Binding ElementName=StrokeWidthSlider, Path=Value,Mode=TwoWay}" Width="72" Height="32" VerticalContentAlignment="Center"/>
+                        <TextBlock Text="Width"  VerticalAlignment="Center" />
+                        <Slider  x:Name="StrokeWidthSlider" Width="96" Margin="12,0,0,0" Value="4" VerticalAlignment="Center" ValueChanged="StrokeWidth_ValueChanged"/>
+                        <TextBox Text="{Binding ElementName=StrokeWidthSlider, Path=Value,Mode=TwoWay}" Width="72" Height="32" VerticalContentAlignment="Center"/>
                     </StackPanel>
                     <StackPanel
                             Grid.Row="3"
@@ -353,7 +353,7 @@
                             HorizontalAlignment="Right"
                             VerticalAlignment="Center"
                             Orientation="Horizontal">
-                        <common:ColorPickerControl x:Name="ColorPickerControl" Loaded="ColorPickerControl_Loaded" ColorChanged="ColorPickerControl_ColorChanged"></common:ColorPickerControl>
+                        <common:ColorPickerControl x:Name="ColorPickerControl" Loaded="ColorPickerControl_Loaded" ColorChanged="ColorPickerControl_ColorChanged" TransparentBtnProperty="Collapsed"></common:ColorPickerControl>
                     </StackPanel>
                 </Grid>
             </TabItem>
@@ -371,7 +371,8 @@
                     BorderThickness="0"
                     Background="#F2F3F5"
                     HorizontalContentAlignment="Center"
-                    VerticalContentAlignment="Center" Grid.ColumnSpan="2"/>
+                    VerticalContentAlignment="Center" Grid.ColumnSpan="2"
+                        FontSize="50"/>
                     <StackPanel Grid.Row="3" Orientation="Horizontal" Grid.ColumnSpan="2">
                         <TextBlock Text="Font" VerticalAlignment="Center"/>
                         <ComboBox Width="232"
@@ -393,7 +394,7 @@
                         HorizontalAlignment="Right"
                         VerticalAlignment="Center"
                         Orientation="Horizontal">
-                        <common:ColorPickerControl x:Name="TextColorPickerControl" Loaded="TextColorPickerControl_Loaded" ColorChanged="TextColorPickerControl_ColorChanged"></common:ColorPickerControl>
+                        <common:ColorPickerControl x:Name="TextColorPickerControl" Loaded="TextColorPickerControl_Loaded" ColorChanged="TextColorPickerControl_ColorChanged" TransparentBtnProperty="Collapsed"></common:ColorPickerControl>
                     </StackPanel>
                 </Grid>
             </TabItem>

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

@@ -86,6 +86,8 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
             DrawinkCanvas.Strokes.Clear();
             InPutTextBox.Text = "";
             ImageImage.Source = null;
+            AddImageBtn.Visibility = Visibility.Visible;
+            SaveBtn.IsEnabled = false;
 
             DrawinkCanvas.DefaultDrawingAttributes.Color = solidColorBrush.Color;
             InPutTextBox.Foreground = solidColorBrush;

+ 1 - 1
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml

@@ -400,7 +400,7 @@
             <Button Content="Clear" Click="Clear_Click"  Height="32" Width="72" HorizontalAlignment="Left"/>
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                 <Button Content="Cancel" Click="Cancel_Click" Width="81" Height="32"/>
-                <Button Content="Save and Apply" Click="Save_Click" x:Name="SaveBtn" Width="136" Height="32"  Margin="8,0,0,0" IsEnabled="True" Style="{StaticResource ButtonStyle}"/>
+                <Button Content="Save and Apply" Click="Save_Click" x:Name="SaveBtn" Width="136" Height="32"  Margin="8,0,0,0" IsEnabled="False" Style="{StaticResource ButtonStyle}"/>
             </StackPanel>
         </Grid>
     </Grid>

+ 3 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml.cs

@@ -359,6 +359,7 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                 return;
             }
             SaveToImage(openFile.FileName);
+            SaveBtn.IsEnabled = true;
         }
 
 
@@ -376,6 +377,8 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
             Date.IsChecked = false;
             Time.IsChecked = false;
             StampText.Text = "Stamp Text";
+            AddImageBtn.Visibility = Visibility.Visible;
+            SaveBtn.IsEnabled = false;
             UpTextPreview();
         }
 

+ 1 - 1
compdfkit_demo_windows/compdfkit/compdfkit-tools/Edit/PDFTextEdit/PDFTextEditControl/PDFTextEditControl.xaml

@@ -6,7 +6,7 @@
              xmlns:local="clr-namespace:compdfkit_tools.Edit"
              xmlns:common="clr-namespace:compdfkit_tools.Common"
              mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800" Width="260" Padding="16,0,16,0"  Background="#FAFCFF">
+             d:DesignHeight="800" d:DesignWidth="292" Width="260" Padding="16,0,16,0"  Background="#FAFCFF">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>

+ 1 - 1
compdfkit_demo_windows/compdfkit/compdfkit-tools/Edit/PDFTextEdit/PDFTextEditUI/CPDFTextStyleUI.xaml

@@ -5,7 +5,7 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:compdfkit_tools.Edit"
              mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
+             d:DesignHeight="800" d:DesignWidth="260">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>

+ 2 - 2
compdfkit_demo_windows/compdfkit/compdfkit-tools/PDFView/PDFScaling/PDFScalingControl/CPDFScalingControl.xaml

@@ -6,8 +6,8 @@
              xmlns:local="clr-namespace:compdfkit_tools.PDFControl"
              xmlns:pdftoolsui="clr-namespace:compdfkit_tools.PDFControlUI"
              mc:Ignorable="d" 
-              d:DesignHeight="30" d:DesignWidth="150">
-    <Grid Height="30" Width="150">
+              d:DesignHeight="30" d:DesignWidth="162">
+    <Grid Height="30" Width="162">
         <pdftoolsui:CPDFScalingUI x:Name="CPDFScalingUI"></pdftoolsui:CPDFScalingUI>
     </Grid>
 </UserControl>

+ 27 - 10
compdfkit_demo_windows/compdfkit/compdfkit-tools/PDFView/PDFScaling/PDFScalingUI/CPDFScalingUI.xaml

@@ -6,21 +6,38 @@
              xmlns:local="clr-namespace:compdfkit_tools.PDFControlUI"
              xmlns:cpdfcommon="clr-namespace:compdfkit_tools.Common"
              mc:Ignorable="d" 
-             d:DesignHeight="30" d:DesignWidth="150">
-    <Grid Height="30" Width="150" >
+             d:DesignHeight="30" d:DesignWidth="162">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ToggleButtonStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ButtonStyle.xaml"></ResourceDictionary>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </UserControl.Resources>
+    <Grid Height="30" Width="160" HorizontalAlignment="Left">
         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="6*"></ColumnDefinition>
-            <ColumnDefinition Width="4*"></ColumnDefinition>
+            <ColumnDefinition Width="72"></ColumnDefinition>
+            <ColumnDefinition Width="73"></ColumnDefinition>
+            <ColumnDefinition Width="17"/>
         </Grid.ColumnDefinitions>
         <StackPanel Orientation="Horizontal" Height="30">
-            <cpdfcommon:DropDownNumberBoxControl x:Name="DropDownNumberBoxControl" Height="30" Width=" 85" Unit="%" Maxium="1600" Minimum="0" Text="{Binding Scale,Mode=TwoWay}"></cpdfcommon:DropDownNumberBoxControl>
+            <cpdfcommon:DropDownNumberBoxControl x:Name="DropDownNumberBoxControl" Height="30" Width=" 72" Unit="%" Maxium="1600" Minimum="0" Text="{Binding Scale,Mode=TwoWay}"></cpdfcommon:DropDownNumberBoxControl>
         </StackPanel>
-        <StackPanel Grid.Column="1" Orientation="Horizontal">
-            <Button x:Name="ScaleDecreaseButton" Height="30" Width="30" Click="ScaleDecreaseButton_Click">
-                <TextBlock Text="-"></TextBlock>
+        <StackPanel Grid.Column="1" Orientation="Horizontal" Grid.ColumnSpan="2">
+            <Button x:Name="ScaleDecreaseButton" Style="{StaticResource LightButtonStyle}" Height="30" Width="30" Margin="20,0,0,0" Background="Transparent" BorderThickness="0" Click="ScaleDecreaseButton_Click">
+                <Button.Content>
+                    <Rectangle Width="12" Height="2" Fill="#0E1114"></Rectangle>
+                </Button.Content>
             </Button>
-            <Button x:Name="ScaleIncreaseButton" Height="30" Width="30" Click="ScaleIncreaseButton_Click">
-                <TextBlock Text="+"></TextBlock>
+            <Button x:Name="ScaleIncreaseButton" Height="30" Width="30" BorderThickness="0" Background="Transparent"  Margin="10,0,0,0" Click="ScaleIncreaseButton_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>
     </Grid>

+ 79 - 1
compdfkit_demo_windows/compdfkit/compdfkit/MainWindow.xaml

@@ -6,7 +6,85 @@
         xmlns:local="clr-namespace:compdfkit"
         mc:Ignorable="d"
         Title="MainWindow" Height="450" Width="800">
+    <Window.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ToggleButtonStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="pack://application:,,,/compdfkit-assets;component/Styles/ButtonStyle.xaml"></ResourceDictionary>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </Window.Resources>
     <Grid>
-        
+        <Grid.RowDefinitions>
+            <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>
+            <!--左侧工具栏-->
+            <StackPanel Orientation="Horizontal" Height="40" Margin="20,0,0,0">
+                <!--打开文件-->
+                <Button BorderThickness="0" VerticalContentAlignment="Center" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent">
+                    <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 
+                                    C12.5104167,3.13020833 12.6158854,3.20182292 12.7070312,3.29296875 C12.7981771,3.38411458 12.8697917,3.48958333 12.921875,3.609375 
+                                    C12.9739583,3.72916667 13,3.859375 13,4 L13,4 L13,6 L15,6 L15.1332465,6.00868056 C15.2206308,6.02025463 15.3051215,6.04340278 
+                                    15.3867188,6.078125 C15.5091146,6.13020833 15.6158854,6.20182292 15.7070312,6.29296875 C15.7981771,6.38411458 15.8697917,6.48958333 
+                                    15.921875,6.609375 C15.9739583,6.72916667 16,6.85677083 16,6.9921875 C16,7.1484375 15.9635417,7.29947917 15.890625,7.4453125 
+                                    L15.890625,7.4453125 L12.6171875,14 L0,14 L0,3 L0.00868055556,2.86284722 C0.0202546296,2.77372685 0.0434027778,2.68923611 0.078125,2.609375 
+                                    C0.130208333,2.48958333 0.201822917,2.38411458 0.29296875,2.29296875 C0.384114583,2.20182292 0.489583333,2.13020833 0.609375,2.078125 
+                                    C0.729166667,2.02604167 0.859375,2 1,2 L1,2 L3.75,2 Z M15,7 L4.3125,7 L1.3125,13 L12,13 L15,7 Z M3.75,3 L1,3 L1,11.3828125 L3.4140625,6.5546875 
+                                    L3.48706055,6.43261719 C3.56665039,6.31738281 3.66601562,6.22265625 3.78515625,6.1484375 C3.94401042,6.04947917 4.11979167,6 4.3125,6 
+                                    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">
+                    <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">
+                    <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>
+
+                
+            </StackPanel>
+        </Grid>
     </Grid>
 </Window>

+ 11 - 1
compdfkit_demo_windows/compdfkit/compdfkit/compdfkit.csproj

@@ -7,7 +7,7 @@
     <ProjectGuid>{807EE747-34A1-4E03-8B72-9E9F6C3BB002}</ProjectGuid>
     <OutputType>WinExe</OutputType>
     <RootNamespace>compdfkit</RootNamespace>
-    <AssemblyName>compdfkit</AssemblyName>
+    <AssemblyName>com.compdfkit.demo</AssemblyName>
     <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -94,5 +94,15 @@
   <ItemGroup>
     <None Include="App.config" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\compdfkit-assets\compdfkit-assets.csproj">
+      <Project>{9b25b167-4896-40e3-a423-7a02cef3005e}</Project>
+      <Name>compdfkit-assets</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\compdfkit-tools\compdfkit-tools.csproj">
+      <Project>{9363bcb1-3a67-446a-8093-5708b86bf418}</Project>
+      <Name>compdfkit-tools</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>