Browse Source

compdfkit(win) - 签名 -> 选择->创建自定义

liuaoran 1 year ago
parent
commit
8d42693eb0

+ 18 - 1
Demo/Examples/Compdfkit_Tools/Compdfkit_Tools.csproj

@@ -206,9 +206,15 @@
     <Compile Include="Common\PropertyControl\WritableComboBoxControl.xaml.cs">
       <DependentUpon>WritableComboBoxControl.xaml</DependentUpon>
     </Compile>
+    <Compile Include="DigitalSignature\AddCertificationControl\AddCertificationControl.xaml.cs">
+      <DependentUpon>AddCertificationControl.xaml</DependentUpon>
+    </Compile>
     <Compile Include="DigitalSignature\AddCertificationControl\AddCertificationDialog.xaml.cs">
       <DependentUpon>AddCertificationDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="DigitalSignature\AddCertificationControl\AddCustomCertificationControl.xaml.cs">
+      <DependentUpon>AddCustomCertificationControl.xaml</DependentUpon>
+    </Compile>
     <Compile Include="DigitalSignature\AddDigitalSignatureControl\AddDigitalSignatureControl.xaml.cs">
       <DependentUpon>AddDigitalSignatureControl.xaml</DependentUpon>
     </Compile>
@@ -627,7 +633,18 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="DigitalSignature\AddCertificationControl\AddCertificationDialog.xaml" />
+    <Page Include="DigitalSignature\AddCertificationControl\AddCertificationControl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="DigitalSignature\AddCertificationControl\AddCertificationDialog.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="DigitalSignature\AddCertificationControl\AddCustomCertificationControl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="DigitalSignature\AddDigitalSignatureControl\AddDigitalSignatureControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 52 - 31
Demo/Examples/Compdfkit_Tools/DigitalSignature/AddCertificationControl/AddCertificationControl.xaml

@@ -1,12 +1,13 @@
-<Window x:Class="Compdfkit_Tools.DigitalSignature.AddCertificationControl.AddCertificationControl"
+<UserControl x:Class="Compdfkit_Tools.DigitalSignature.AddCertificationControl.AddCertificationControl"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:Compdfkit_Tools.DigitalSignature.AddCertificationControl"
              mc:Ignorable="d"
-             d:DesignHeight="474" d:DesignWidth="462">
-    <Grid Margin="10,10,10,10">
+             Height="500"
+             Width="462">
+    <Grid Margin="10,10,10,0">
         <Grid.RowDefinitions>
             <RowDefinition Height="Auto" />
             <RowDefinition Height="Auto" />
@@ -14,37 +15,57 @@
             <RowDefinition Height="Auto" />
             <RowDefinition Height="Auto" />
         </Grid.RowDefinitions>
-        <Label Grid.Row="0" Content="Select the type of Digital ID:" FontSize="14" FontFamily="Segoe UI" FontWeight="600" Padding="0,4,0,4" Width="187" HorizontalAlignment="Left"></Label>
-        <StackPanel Grid.Row="1" Orientation="Horizontal">
-            <RadioButton FontSize="16" BorderThickness="1" Margin="0,2,0,0" BorderBrush="#43474D" GroupName="ChooseCertification" VerticalAlignment="Center"></RadioButton>
-            <StackPanel Orientation="Horizontal" Width="386" Height="80">
-                <Image  Width="32" Height="32" Margin="0,0,0,0" VerticalAlignment="Center"></Image>
-                <StackPanel Orientation="Vertical" Margin="10,0,0,0" VerticalAlignment="Center">
-                    <Label Content="Use a Digital ID from a file" FontSize="14" FontFamily="Segoe UI" FontWeight="600" Padding="0,4,0,4" Width="168" HorizontalAlignment="Left" VerticalAlignment="Top"></Label>
-                    <Label Content="Import an existing Digital ID that you have obtained as a file" FontSize="12" FontFamily="Segoe UI" FontWeight="400" Padding="0,4,0,4" Width="318" HorizontalAlignment="Left" VerticalAlignment="Bottom"></Label>
-                </StackPanel>
-            </StackPanel>
-        </StackPanel>
-        <StackPanel Grid.Row="2" Orientation="Horizontal">
-            <RadioButton FontSize="16" BorderThickness="1" Margin="0,2,0,0" BorderBrush="#43474D" GroupName="ChooseCertification" VerticalAlignment="Center"></RadioButton>
-            <StackPanel Orientation="Horizontal" Width="386" Height="80">
-                <Image  Width="32" Height="32" Margin="0,0,0,0" VerticalAlignment="Center"></Image>
-                <StackPanel Orientation="Vertical" Margin="10,0,0,0" VerticalAlignment="Center">
-                    <Label Content="Use a Digital ID from a file" FontSize="14" FontFamily="Segoe UI" FontWeight="600" Padding="0,4,0,4" Width="168" HorizontalAlignment="Left" VerticalAlignment="Top"></Label>
-                    <Label Content="Create your self-signed Digital ID" FontSize="12" FontFamily="Segoe UI" FontWeight="400" Padding="0,4,0,4" Width="318" HorizontalAlignment="Left" VerticalAlignment="Bottom"></Label>
-                </StackPanel>
-            </StackPanel>
-        </StackPanel>
-        <StackPanel Grid.Row="3" Margin="10,10,10,10">
-                <TextBlock FontWeight="400" FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" TextWrapping="Wrap" Background="#F2F2F2" Padding="12,10,12,10"
+        <Label Grid.Row="0" Content="Select the type of Digital ID:" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold" Padding="0,4,0,4" Width="187" HorizontalAlignment="Left"></Label>
+        <RadioButton Grid.Row="1" GroupName="ChooseCertification" Margin="0,20,0,20" >
+            <RadioButton.Template>
+                <ControlTemplate TargetType="RadioButton">
+                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+                        <RadioButton IsChecked="{TemplateBinding IsChecked}" VerticalAlignment="Center" Margin="10,0,10,0"/>
+
+                        <Border BorderThickness="1" BorderBrush="Black" Width="386" Height="80">
+                            <StackPanel Orientation="Horizontal">
+                                <Image Width="32" Height="32" VerticalAlignment="Center" Margin="10,0,10,0"/>
+                                <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+                                    <Label Content="Use a Digital ID from a file" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold" Padding="0,4,0,4"/>
+                                    <Label Content="Import an existing Digital ID that you have obtained as a file" FontSize="12" FontFamily="Segoe UI"  Padding="0,4,0,4"/>
+                                </StackPanel>
+                            </StackPanel>
+                        </Border>
+                    </StackPanel>
+                </ControlTemplate>
+            </RadioButton.Template>
+        </RadioButton>
+        <RadioButton Grid.Row="2" GroupName="ChooseCertification" Margin="0,2,0,10">
+            <RadioButton.Template>
+                <ControlTemplate TargetType="RadioButton">
+                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+                        <RadioButton IsChecked="{TemplateBinding IsChecked}" VerticalAlignment="Center" Margin="10,0,10,0"/>
+
+                        <Border BorderThickness="1" BorderBrush="Black" Width="386" Height="80">
+                            <StackPanel Orientation="Horizontal">
+                                <Image Width="32" Height="32" VerticalAlignment="Center" Margin="10,0,10,0"/>
+                                <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+                                    <Label Content="Use a Digital ID from a file" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold" Padding="0,4,0,4"/>
+                                    <Label Content="Create your self-signed Digital ID" FontSize="12" FontFamily="Segoe UI"  Padding="0,4,0,4"/>
+                                </StackPanel>
+                            </StackPanel>
+                        </Border>
+                    </StackPanel>
+                </ControlTemplate>
+            </RadioButton.Template>
+        </RadioButton>
+
+        <StackPanel Grid.Row="3" Margin="10,20,10,20" Width="407">
+            <TextBlock  FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" TextWrapping="Wrap" Background="#F2F2F2" Padding="12,10,12,10"
                            Text="A Digital ID is required to create a digital signature. The most secure Digital ID are issued by trusted Certificate authorities and are based on secure devices like smart card or token. Some are based on files."/>
-                <TextBlock FontWeight="400" FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" TextWrapping="Wrap" Background="#F2F2F2"/>
-                <TextBlock FontWeight="400" FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" TextWrapping="Wrap" Background="#F2F2F2" Padding="12,10,12,10"
+            <TextBlock  FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" TextWrapping="Wrap" Background="#F2F2F2"/>
+            <TextBlock  FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" TextWrapping="Wrap" Background="#F2F2F2" Padding="12,10,12,10"
                            Text="You can also create a new Digital ID, but they provide a low level of identity assurance."/>
         </StackPanel>
         <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Right">
-            <Button Content="Cancel" Width="112" Height="32" BorderThickness="1" Margin="0,0,10,0"></Button>
-            <Button Content="Continue" Width="112" Height="32" BorderThickness="1"></Button>
+            <Button Content="Cancel"  Margin="0,0,10,0" Width="112" Height="32" BorderThickness="1"></Button>
+            <Button x:Name="ContinueBtn" Content="Continue" Width="112" Height="32" BorderThickness="1" Click="ContinueBtn_Click"></Button>
+         
         </StackPanel>
     </Grid>
-</Window>
+</UserControl>

+ 20 - 0
Demo/Examples/Compdfkit_Tools/DigitalSignature/AddCertificationControl/AddCertificationControl.xaml.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Compdfkit_Tools.DigitalSignature.AddCertificationControl
+{
+    public partial class AddCertificationControl : UserControl
+    {
+        public event EventHandler ContinueEvent;
+        public AddCertificationControl()
+        {
+            InitializeComponent();
+        }
+
+        private void ContinueBtn_Click(object sender, RoutedEventArgs e)
+        {
+            ContinueEvent?.Invoke(this, EventArgs.Empty);
+        }
+    }
+}

+ 13 - 71
Demo/Examples/Compdfkit_Tools/DigitalSignature/AddCertificationControl/AddCertificationDialog.xaml

@@ -1,72 +1,14 @@
-<Window x:Class="Compdfkit_Tools.DigitalSignature.AddCertificationControl.AddCertificationDialog"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-             xmlns:local="clr-namespace:Compdfkit_Tools.DigitalSignature.AddCertificationControl"
-             ShowInTaskbar="False"
-             mc:Ignorable="d"
-             Height="500"
-             Width="462">
-    <Grid Margin="10,10,10,0">
-        <Grid.RowDefinitions>
-            <RowDefinition Height="Auto" />
-            <RowDefinition Height="Auto" />
-            <RowDefinition Height="Auto" />
-            <RowDefinition Height="Auto" />
-            <RowDefinition Height="Auto" />
-        </Grid.RowDefinitions>
-        <Label Grid.Row="0" Content="Select the type of Digital ID:" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold" Padding="0,4,0,4" Width="187" HorizontalAlignment="Left"></Label>
-        <RadioButton Grid.Row="1" GroupName="ChooseCertification" Margin="0,20,0,20" >
-            <RadioButton.Template>
-                <ControlTemplate TargetType="RadioButton">
-                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
-                        <RadioButton IsChecked="{TemplateBinding IsChecked}" VerticalAlignment="Center" Margin="10,0,10,0"/>
-
-                        <Border BorderThickness="1" BorderBrush="Black" Width="386" Height="80">
-                            <StackPanel Orientation="Horizontal">
-                                <Image Width="32" Height="32" VerticalAlignment="Center" Margin="10,0,10,0"/>
-                                <StackPanel Orientation="Vertical" VerticalAlignment="Center">
-                                    <Label Content="Use a Digital ID from a file" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold" Padding="0,4,0,4"/>
-                                    <Label Content="Import an existing Digital ID that you have obtained as a file" FontSize="12" FontFamily="Segoe UI"  Padding="0,4,0,4"/>
-                                </StackPanel>
-                            </StackPanel>
-                        </Border>
-                    </StackPanel>
-                </ControlTemplate>
-            </RadioButton.Template>
-        </RadioButton>
-        <RadioButton Grid.Row="2" GroupName="ChooseCertification" Margin="0,2,0,10">
-            <RadioButton.Template>
-                <ControlTemplate TargetType="RadioButton">
-                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
-                        <RadioButton IsChecked="{TemplateBinding IsChecked}" VerticalAlignment="Center" Margin="10,0,10,0"/>
-
-                        <Border BorderThickness="1" BorderBrush="Black" Width="386" Height="80">
-                            <StackPanel Orientation="Horizontal">
-                                <Image Width="32" Height="32" VerticalAlignment="Center" Margin="10,0,10,0"/>
-                                <StackPanel Orientation="Vertical" VerticalAlignment="Center">
-                                    <Label Content="Use a Digital ID from a file" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold" Padding="0,4,0,4"/>
-                                    <Label Content="Create your self-signed Digital ID" FontSize="12" FontFamily="Segoe UI"  Padding="0,4,0,4"/>
-                                </StackPanel>
-                            </StackPanel>
-                        </Border>
-                    </StackPanel>
-                </ControlTemplate>
-            </RadioButton.Template>
-        </RadioButton>
-
-
-        <StackPanel Grid.Row="3" Margin="10,20,10,20" Width="407">
-            <TextBlock  FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" TextWrapping="Wrap" Background="#F2F2F2" Padding="12,10,12,10"
-                           Text="A Digital ID is required to create a digital signature. The most secure Digital ID are issued by trusted Certificate authorities and are based on secure devices like smart card or token. Some are based on files."/>
-            <TextBlock  FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" TextWrapping="Wrap" Background="#F2F2F2"/>
-            <TextBlock  FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" TextWrapping="Wrap" Background="#F2F2F2" Padding="12,10,12,10"
-                           Text="You can also create a new Digital ID, but they provide a low level of identity assurance."/>
-        </StackPanel>
-        <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Right">
-            <Button Content="Cancel" Width="112" Height="32" BorderThickness="1" Margin="0,0,10,0"></Button>
-            <Button Content="Continue" Width="112" Height="32" BorderThickness="1"></Button>
-        </StackPanel>
-    </Grid>
+<Window x:Class="Compdfkit_Tools.DigitalSignature.AddCertificationControl.AddCertificationDialog"
+        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:Compdfkit_Tools.DigitalSignature.AddCertificationControl"
+        mc:Ignorable="d"
+        Title="AddCertificationDialog" Height="450" Width="800"
+        Loaded="Window_Loaded"
+        Unloaded="Window_Unloaded">
+    <Border x:Name="BodyBd">
+        
+    </Border>
 </Window>

+ 39 - 1
Demo/Examples/Compdfkit_Tools/DigitalSignature/AddCertificationControl/AddCertificationDialog.xaml.cs

@@ -1,13 +1,51 @@
+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.Shapes;
 
 namespace Compdfkit_Tools.DigitalSignature.AddCertificationControl
 {
+    /// <summary>
+    /// AddCertificationDialog.xaml 的交互逻辑
+    /// </summary>
     public partial class AddCertificationDialog : Window
     {
+        private AddCertificationControl addCertificationControl = null;    
+        private AddCustomCertificationControl addCustomCertificationControl = null;
+
         public AddCertificationDialog()
         {
             InitializeComponent();
+            addCertificationControl = new AddCertificationControl();
+            BodyBd.Child = addCertificationControl;
         }
+
+        private void Window_Loaded(object sender, RoutedEventArgs e)
+        {
+            addCertificationControl.ContinueEvent += AddCertificationControl_ContinueEvent;
+
+        }
+
+        private void Window_Unloaded(object sender, RoutedEventArgs e)
+        {
+            addCertificationControl.ContinueEvent -= AddCertificationControl_ContinueEvent;
+        }
+
+        private void AddCertificationControl_ContinueEvent(object sender, EventArgs e)
+        {
+            addCustomCertificationControl = new AddCustomCertificationControl();
+            BodyBd.Child = addCustomCertificationControl;
+
+        }
+
     }
-}
+}

+ 75 - 0
Demo/Examples/Compdfkit_Tools/DigitalSignature/AddCertificationControl/AddCustomCertificationControl.xaml

@@ -0,0 +1,75 @@
+<UserControl x:Class="Compdfkit_Tools.DigitalSignature.AddCertificationControl.AddCustomCertificationControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Compdfkit_Tools.DigitalSignature.AddCertificationControl"
+              xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common"
+             mc:Ignorable="d" 
+             Height="340" Width="403">
+    <UserControl.Resources>
+        <cpdfcommon:TextLengthToVisibilityConverter x:Key="TextLengthToVisibilityConverter"></cpdfcommon:TextLengthToVisibilityConverter>
+        <cpdfcommon:BoolToCollapsedConverter x:Key="BoolToCollapsedConverter"></cpdfcommon:BoolToCollapsedConverter>
+    </UserControl.Resources>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="280"></RowDefinition>
+            <RowDefinition></RowDefinition>
+        </Grid.RowDefinitions>
+        <Grid Background="#ffffff"  Margin="20,0,0,0"  Panel.ZIndex="1" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top">
+            <TextBlock Text="Signature Information" FontWeight="Bold" FontSize="16"></TextBlock>
+        </Grid>
+        <Border Margin="12" BorderBrush="#33000000" BorderThickness="1">
+            <Grid Margin="10">
+                <Grid.RowDefinitions>
+                    <RowDefinition></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                </Grid.RowDefinitions>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="*"></ColumnDefinition>
+                    <ColumnDefinition Width="2*"></ColumnDefinition>
+                </Grid.ColumnDefinitions>
+                <TextBlock Text="Grantor Name" VerticalAlignment="Center"></TextBlock>
+                <Grid Grid.Column="1">
+                    <TextBox Height="28" x:Name="GrantorNameTxt" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
+                    <TextBlock Text="Please Enter Grantor Name" VerticalAlignment="Center"  Margin="10" Visibility="{Binding ElementName=GrantorNameTxt, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB"></TextBlock>
+                </Grid>
+                <TextBlock Grid.Row="1" Text="Parse2Txt" VerticalAlignment="Center"></TextBlock>
+                <Grid Grid.Column="1" Grid.Row="1">
+                    <TextBox Height="28" x:Name="Parse2Txt" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
+                    <TextBlock Text="Please Enter Parse2Txt" VerticalAlignment="Center"  Margin="10" Visibility="{Binding ElementName=Parse2Txt, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB"></TextBlock>
+                </Grid>
+                <TextBlock Grid.Row="2" Text="Departmental" VerticalAlignment="Center"></TextBlock>
+                <Grid Grid.Column="1" Grid.Row="2">
+                    <TextBox Height="28" x:Name="DepartmentalTxt" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
+                    <TextBlock Text="Please Enter Departmental" VerticalAlignment="Center"  Margin="10" Visibility="{Binding ElementName=DepartmentalTxt, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB"></TextBlock>
+                </Grid>
+                <TextBlock Grid.Row="3" Text="Unit Name" VerticalAlignment="Center"></TextBlock>
+                <Grid Grid.Column="1" Grid.Row="3">
+                    <TextBox Height="28" x:Name="UnitNameTxt" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
+                    <TextBlock Text="Please Enter Unit Name" VerticalAlignment="Center"  Margin="10" Visibility="{Binding ElementName=UnitNameTxt, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB"></TextBlock>
+                </Grid>
+                <TextBlock Grid.Row="4" Text="Email" VerticalAlignment="Center"></TextBlock>
+                <Grid Grid.Column="1" Grid.Row="4">
+                    <TextBox Height="28" x:Name="EmailTxt" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
+                    <TextBlock Text="Please Enter Email" VerticalAlignment="Center"  Margin="10" Visibility="{Binding ElementName=Email, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB"></TextBlock>
+                </Grid>
+                <TextBlock Grid.Row="5" Text="Country/Area" VerticalAlignment="Center"></TextBlock>
+                <Grid Grid.Column="1" Grid.Row="5">
+                    <TextBox Height="28" x:Name="AreaTxt" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
+                    <ComboBox Margin="0,5,0,5"></ComboBox>
+                </Grid>
+            </Grid>
+        </Border>
+        <Grid Grid.Row="1">
+            <StackPanel Margin="0,0,24,12" VerticalAlignment="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
+                <Button Height="32" Width="112" Margin="0,0,8,0" Content="Cancel"></Button>
+                <Button Height="32" Width="112" Content="Save"></Button>
+            </StackPanel>   
+        </Grid>
+    </Grid>
+</UserControl>

+ 28 - 0
Demo/Examples/Compdfkit_Tools/DigitalSignature/AddCertificationControl/AddCustomCertificationControl.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 Compdfkit_Tools.DigitalSignature.AddCertificationControl
+{
+    /// <summary>
+    /// AddCustomCertificationControl.xaml 的交互逻辑
+    /// </summary>
+    public partial class AddCustomCertificationControl : UserControl
+    {
+        public AddCustomCertificationControl()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 0 - 2
Demo/Examples/Compdfkit_Tools/DigitalSignature/AddDigitalSignatureControl/AddDigitalSignatureControl.xaml.cs

@@ -24,8 +24,6 @@ namespace Compdfkit_Tools.DigitalSignature
     /// </summary>
     public partial class AddDigitalSignControl : UserControl
     {
-
-
         public AddDigitalSignControl()
         {
             InitializeComponent();

+ 10 - 0
Demo/Examples/PDFViewer/MainPage.xaml.cs

@@ -693,6 +693,16 @@ namespace PDFViewer
             PopupBorder.Visibility = Visibility.Collapsed;
         }
         #endregion
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void UserControl_Unloaded(object sender, RoutedEventArgs e)
+        {
+
+        }
     }
 
 }