Parcourir la source

填写与签名-补充填写与签名文件结构

ZhouJieSheng il y a 2 ans
Parent
commit
0e78df84f6

+ 1 - 0
PDF Office/App.xaml

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

+ 14 - 5
PDF Office/App.xaml.cs

@@ -33,6 +33,8 @@ using PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter;
 using PDF_Office.Views.PropertyPanel;
 using PDF_Office.Views.PropertyPanel;
 using PDF_Office.Views.Dialog.BOTA;
 using PDF_Office.Views.Dialog.BOTA;
 using PDF_Office.Views.PropertyPanel.AnnotPanel;
 using PDF_Office.Views.PropertyPanel.AnnotPanel;
+using PDF_Office.Views.FillAndSign;
+using PDF_Office.Views.FillAndSign.PropertyPanel;
 
 
 namespace PDF_Office
 namespace PDF_Office
 {
 {
@@ -97,7 +99,7 @@ namespace PDF_Office
 
 
         protected override void RegisterTypes(IContainerRegistry containerRegistry)
         protected override void RegisterTypes(IContainerRegistry containerRegistry)
         {
         {
-            //注册内容组件
+            #region 注册内容组件
             containerRegistry.RegisterForNavigation<HomeContent>();
             containerRegistry.RegisterForNavigation<HomeContent>();
             containerRegistry.RegisterForNavigation<ViewContent>();
             containerRegistry.RegisterForNavigation<ViewContent>();
             containerRegistry.RegisterForNavigation<MainContent>();
             containerRegistry.RegisterForNavigation<MainContent>();
@@ -114,16 +116,22 @@ namespace PDF_Office
             containerRegistry.RegisterForNavigation<HomePagePrinterModSizeContent>();
             containerRegistry.RegisterForNavigation<HomePagePrinterModSizeContent>();
             containerRegistry.RegisterForNavigation<HomePagePrinterModPosterContent>();
             containerRegistry.RegisterForNavigation<HomePagePrinterModPosterContent>();
             containerRegistry.RegisterForNavigation<HomePagePrinterModMutipleContent>();
             containerRegistry.RegisterForNavigation<HomePagePrinterModMutipleContent>();
-            containerRegistry.RegisterForNavigation<FreehandAnnotProperty>();
+            containerRegistry.RegisterForNavigation<FreehandAnnotProperty>(); 
             containerRegistry.RegisterForNavigation<FreetextAnnotProperty>();
             containerRegistry.RegisterForNavigation<FreetextAnnotProperty>();
             containerRegistry.RegisterForNavigation<ImageAnnotProperty>();
             containerRegistry.RegisterForNavigation<ImageAnnotProperty>();
-            containerRegistry.RegisterForNavigation<LinkAnnotProperty>();
+            containerRegistry.RegisterForNavigation<LinkAnnotProperty>(); 
             containerRegistry.RegisterForNavigation<SharpsAnnotProperty>();
             containerRegistry.RegisterForNavigation<SharpsAnnotProperty>();
             containerRegistry.RegisterForNavigation<StampAnnotProperty>();
             containerRegistry.RegisterForNavigation<StampAnnotProperty>();
             containerRegistry.RegisterForNavigation<TextAnnotProperty>();
             containerRegistry.RegisterForNavigation<TextAnnotProperty>();
             containerRegistry.RegisterForNavigation<TextEditProperty>();
             containerRegistry.RegisterForNavigation<TextEditProperty>();
-
-            //注册弹窗
+            //填写与签名
+            containerRegistry.RegisterForNavigation<FillAndSignContent>();
+            containerRegistry.RegisterForNavigation<DateFillProperty>();
+            containerRegistry.RegisterForNavigation<ShapFillProperty>();
+            containerRegistry.RegisterForNavigation<TextFillProperty>();
+            #endregion
+
+            #region 注册弹窗
             containerRegistry.RegisterDialog<VerifyPassWordDialog>(DialogNames.VerifyPassWordDialog);
             containerRegistry.RegisterDialog<VerifyPassWordDialog>(DialogNames.VerifyPassWordDialog);
             containerRegistry.RegisterDialog<FullScreenWindow>(DialogNames.FullScreenDialog);
             containerRegistry.RegisterDialog<FullScreenWindow>(DialogNames.FullScreenDialog);
             containerRegistry.RegisterDialog<CompressDialog>(DialogNames.CompressDialog);
             containerRegistry.RegisterDialog<CompressDialog>(DialogNames.CompressDialog);
@@ -141,6 +149,7 @@ namespace PDF_Office
             containerRegistry.RegisterDialog<HomePagePrinterPageSetDialog>(DialogNames.HomePagePrinterPageSetDialog);
             containerRegistry.RegisterDialog<HomePagePrinterPageSetDialog>(DialogNames.HomePagePrinterPageSetDialog);
             containerRegistry.RegisterDialog<HomePagePictureToPDFDialog>(DialogNames.HomePagePictureToPDFDialog);
             containerRegistry.RegisterDialog<HomePagePictureToPDFDialog>(DialogNames.HomePagePictureToPDFDialog);
             containerRegistry.RegisterDialog<AddBookmarkDialog>(DialogNames.AddBookmarkDialog);
             containerRegistry.RegisterDialog<AddBookmarkDialog>(DialogNames.AddBookmarkDialog);
+            #endregion
         }
         }
 
 
         protected override void ConfigureRegionAdapterMappings(RegionAdapterMappings regionAdapterMappings)
         protected override void ConfigureRegionAdapterMappings(RegionAdapterMappings regionAdapterMappings)

+ 32 - 1
PDF Office/PDF Office.csproj

@@ -282,6 +282,10 @@
     <Compile Include="ViewModels\Dialog\ToolsDialogs\SaftyDialogs\CheckPasswordDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ToolsDialogs\SaftyDialogs\CheckPasswordDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ToolsDialogs\SaftyDialogs\SetPasswordDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ToolsDialogs\SaftyDialogs\SetPasswordDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\VerifyPassWordDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\VerifyPassWordDialogViewModel.cs" />
+    <Compile Include="ViewModels\FillAndSign\FillAndSignContentViewModel.cs" />
+    <Compile Include="ViewModels\FillAndSign\PropertyPanel\DateFillPropertyViewModel.cs" />
+    <Compile Include="ViewModels\FillAndSign\PropertyPanel\ShapFillPropertyViewModel.cs" />
+    <Compile Include="ViewModels\FillAndSign\PropertyPanel\TextFillPropertyViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\CloudDrive\CloudDriveContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\CloudDrive\CloudDriveContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\CloudDrive\CloudDriveManager.cs" />
     <Compile Include="ViewModels\HomePanel\CloudDrive\CloudDriveManager.cs" />
     <Compile Include="ViewModels\HomePanel\CloudDrive\CloudFilesContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\CloudDrive\CloudFilesContentViewModel.cs" />
@@ -382,6 +386,18 @@
     <Compile Include="Views\Dialog\VerifyPassWordDialog.xaml.cs">
     <Compile Include="Views\Dialog\VerifyPassWordDialog.xaml.cs">
       <DependentUpon>VerifyPassWordDialog.xaml</DependentUpon>
       <DependentUpon>VerifyPassWordDialog.xaml</DependentUpon>
     </Compile>
     </Compile>
+    <Compile Include="Views\FillAndSign\FillAndSignContent.xaml.cs">
+      <DependentUpon>FillAndSignContent.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\FillAndSign\PropertyPanel\DateFillProperty.xaml.cs">
+      <DependentUpon>DateFillProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\FillAndSign\PropertyPanel\ShapFillProperty.xaml.cs">
+      <DependentUpon>ShapFillProperty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\FillAndSign\PropertyPanel\TextFillProperty.xaml.cs">
+      <DependentUpon>TextFillProperty.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\HomePanel\CloudDrive\CloudDriveContent.xaml.cs">
     <Compile Include="Views\HomePanel\CloudDrive\CloudDriveContent.xaml.cs">
       <DependentUpon>CloudDriveContent.xaml</DependentUpon>
       <DependentUpon>CloudDriveContent.xaml</DependentUpon>
     </Compile>
     </Compile>
@@ -641,6 +657,22 @@
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
     </Page>
     </Page>
+    <Page Include="Views\FillAndSign\FillAndSignContent.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\FillAndSign\PropertyPanel\DateFillProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\FillAndSign\PropertyPanel\ShapFillProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\FillAndSign\PropertyPanel\TextFillProperty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Views\HomeContent.xaml">
     <Page Include="Views\HomeContent.xaml">
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
@@ -792,7 +824,6 @@
   <ItemGroup>
   <ItemGroup>
     <Folder Include="Views\Dialog\Convertor\" />
     <Folder Include="Views\Dialog\Convertor\" />
     <Folder Include="Views\Edit\" />
     <Folder Include="Views\Edit\" />
-    <Folder Include="Views\FillAndSign\" />
     <Folder Include="Views\Forms\" />
     <Folder Include="Views\Forms\" />
     <Folder Include="Views\Scan\" />
     <Folder Include="Views\Scan\" />
   </ItemGroup>
   </ItemGroup>

+ 274 - 110
PDF Office/Styles/CustomBtnStyle.xaml

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

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

@@ -0,0 +1,94 @@
+using ComPDFKitViewer.PdfViewer;
+using PDF_Office.Model;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace PDF_Office.ViewModels.FillAndSign
+{
+    public class FillAndSignContentViewModel : BindableBase, INavigationAware
+    {
+        #region 
+        private CPDFViewer pdfViewer;
+
+        private ViewContentViewModel viewContentViewMode;
+
+        private IRegionManager regions { get; set; }
+        #endregion
+
+        #region Command
+        public DelegateCommand<RoutedEventArgs> CheckCommand { get; set; }
+
+        /// <summary>
+        /// 按钮名称和属性面板映射字典
+        /// </summary>
+        public Dictionary<string, string> btnToProperty = new Dictionary<string, string>();
+        #endregion
+
+        public FillAndSignContentViewModel(IRegionManager regionManager)
+        {
+            regions = regionManager;
+
+            CheckCommand = new DelegateCommand<RoutedEventArgs>(CheckedEvent);
+
+            InitDictionary();
+        }
+
+        private void CheckedEvent(RoutedEventArgs e)
+        {
+            var control = e.OriginalSource as Control;
+
+            NavigateToProperty(control.Name);
+        }
+
+        private void NavigateToProperty(string btnName)
+        {
+            NavigationParameters values = new NavigationParameters();
+            values.Add(ParameterNames.PDFViewer, pdfViewer);
+            regions.RequestNavigate(RegionNames.PropertyRegionName,btnToProperty[btnName]);
+            viewContentViewMode.IsPropertyOpen = true;
+        }
+
+        /// <summary>
+        /// 初始化按钮名称-属性面板字典
+        /// </summary>
+        private void InitDictionary()
+        {
+            btnToProperty["RbtnText"] = "TextFillProperty";
+            btnToProperty["RbtnTick"] = "ShapFillProperty";
+            btnToProperty["RbtnFork"] = "ShapFillProperty";
+            btnToProperty["RbtnRectangle"] = "ShapFillProperty";
+            btnToProperty["RbtnLine"] = "ShapFillProperty";
+            btnToProperty["RbtnPoint"] = "ShapFillProperty";
+            btnToProperty["RbtnDate"] = "DateFillProperty";
+            btnToProperty["RbtnSign"] = "";
+
+        }
+
+        #region Navigation
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+            navigationContext.Parameters.TryGetValue<ViewContentViewModel>(ParameterNames.ViewContentViewModel, out viewContentViewMode);
+            navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out pdfViewer);
+        }
+        #endregion
+    }
+}

+ 33 - 0
PDF Office/ViewModels/FillAndSign/PropertyPanel/DateFillPropertyViewModel.cs

@@ -0,0 +1,33 @@
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.ViewModels.FillAndSign.PropertyPanel
+{
+    public class DateFillPropertyViewModel : BindableBase, INavigationAware
+    {
+        public DateFillPropertyViewModel()
+        {
+
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+            
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+            
+        }
+    }
+}

+ 33 - 0
PDF Office/ViewModels/FillAndSign/PropertyPanel/ShapFillPropertyViewModel.cs

@@ -0,0 +1,33 @@
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.ViewModels.FillAndSign.PropertyPanel
+{
+    public class ShapFillPropertyViewModel : BindableBase, INavigationAware
+    {
+        public ShapFillPropertyViewModel()
+        {
+
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+
+        }
+    }
+}

+ 33 - 0
PDF Office/ViewModels/FillAndSign/PropertyPanel/TextFillPropertyViewModel.cs

@@ -0,0 +1,33 @@
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Office.ViewModels.FillAndSign.PropertyPanel
+{
+    public class TextFillPropertyViewModel : BindableBase, INavigationAware
+    {
+        public TextFillPropertyViewModel()
+        {
+
+        }
+
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+
+        }
+    }
+}

+ 1 - 1
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -315,7 +315,7 @@ namespace PDF_Office.ViewModels
             dictionary.Add("TabItemScan", "");
             dictionary.Add("TabItemScan", "");
             dictionary.Add("TabItemEdit", "");
             dictionary.Add("TabItemEdit", "");
             dictionary.Add("TabItemForm", "");
             dictionary.Add("TabItemForm", "");
-            dictionary.Add("TabItemFill", "");
+            dictionary.Add("TabItemFill", "FillAndSignContent");
         }
         }
 
 
         private void UndoManager_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
         private void UndoManager_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)

Fichier diff supprimé car celui-ci est trop grand
+ 102 - 0
PDF Office/Views/FillAndSign/FillAndSignContent.xaml


+ 28 - 0
PDF Office/Views/FillAndSign/FillAndSignContent.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.Views.FillAndSign
+{
+    /// <summary>
+    /// FillAndSignContent.xaml 的交互逻辑
+    /// </summary>
+    public partial class FillAndSignContent : UserControl
+    {
+        public FillAndSignContent()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 19 - 0
PDF Office/Views/FillAndSign/PropertyPanel/DateFillProperty.xaml

@@ -0,0 +1,19 @@
+<UserControl
+    x:Class="PDF_Office.Views.FillAndSign.PropertyPanel.DateFillProperty"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Office.Views.FillAndSign.PropertyPanel"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    d:DesignHeight="450"
+    d:DesignWidth="260"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    mc:Ignorable="d">
+    <Grid Margin="16">
+        <TextBlock
+            FontSize="16"
+            LineHeight="24"
+            Text="日期 " />
+    </Grid>
+</UserControl>

+ 28 - 0
PDF Office/Views/FillAndSign/PropertyPanel/DateFillProperty.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.Views.FillAndSign.PropertyPanel
+{
+    /// <summary>
+    /// DateFillProperty.xaml 的交互逻辑
+    /// </summary>
+    public partial class DateFillProperty : UserControl
+    {
+        public DateFillProperty()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 19 - 0
PDF Office/Views/FillAndSign/PropertyPanel/ShapFillProperty.xaml

@@ -0,0 +1,19 @@
+<UserControl
+    x:Class="PDF_Office.Views.FillAndSign.PropertyPanel.ShapFillProperty"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Office.Views.FillAndSign.PropertyPanel"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    d:DesignHeight="450"
+    d:DesignWidth="260"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    mc:Ignorable="d">
+    <Grid Margin="16">
+        <TextBlock
+            FontSize="16"
+            LineHeight="24"
+            Text="勾形" />
+    </Grid>
+</UserControl>

+ 28 - 0
PDF Office/Views/FillAndSign/PropertyPanel/ShapFillProperty.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.Views.FillAndSign.PropertyPanel
+{
+    /// <summary>
+    /// ShapFillProperty.xaml 的交互逻辑
+    /// </summary>
+    public partial class ShapFillProperty : UserControl
+    {
+        public ShapFillProperty()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 19 - 0
PDF Office/Views/FillAndSign/PropertyPanel/TextFillProperty.xaml

@@ -0,0 +1,19 @@
+<UserControl
+    x:Class="PDF_Office.Views.FillAndSign.PropertyPanel.TextFillProperty"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Office.Views.FillAndSign.PropertyPanel"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    d:DesignHeight="450"
+    d:DesignWidth="260"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    mc:Ignorable="d">
+    <Grid Margin="16">
+        <TextBlock
+            FontSize="16"
+            LineHeight="24"
+            Text="文本" />
+    </Grid>
+</UserControl>

+ 28 - 0
PDF Office/Views/FillAndSign/PropertyPanel/TextFillProperty.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.Views.FillAndSign.PropertyPanel
+{
+    /// <summary>
+    /// TextFillProperty.xaml 的交互逻辑
+    /// </summary>
+    public partial class TextFillProperty : UserControl
+    {
+        public TextFillProperty()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 1 - 1
PDF Office/Views/ViewContent.xaml

@@ -201,7 +201,7 @@
                 HorizontalAlignment="Stretch"
                 HorizontalAlignment="Stretch"
                 prism:RegionManager.RegionName="{Binding ViwerRegionName}" />
                 prism:RegionManager.RegionName="{Binding ViwerRegionName}" />
             <ScrollViewer Grid.Column="4" VerticalScrollBarVisibility="Auto">
             <ScrollViewer Grid.Column="4" VerticalScrollBarVisibility="Auto">
-                <ContentControl prism:RegionManager.RegionName="{Binding PropertyRegionName}" />
+                <ContentControl prism:RegionManager.RegionName="{Binding PropertyRegionName}"/>
             </ScrollViewer>
             </ScrollViewer>
 
 
         </Grid>
         </Grid>