Browse Source

compdfkit(win) - 调整UI布局

weixiangjie 1 year ago
parent
commit
fe7cb279af

+ 7 - 16
Demo/Examples/Compdfkit_Tools/DigitalSignature/FillDigitalSignatureControl/FillDigitalSignatureControl.xaml

@@ -171,13 +171,13 @@
             </Grid>
         </Grid>
         
-        <Border Name="KeyboardPopup" Background="#A0000000" Visibility="Collapsed">
+        <Border Name="KeyboardPopup" Background="#A0000000" Visibility="Visible">
             <Grid Background="White" Width="628" Height="412">
                     <Grid.RowDefinitions>
-                        <RowDefinition Height="32" />
-                        <RowDefinition Height="240" />
-                        <RowDefinition Height="48" />
-                        <RowDefinition Height="48" />
+                        <RowDefinition Height="auto" />
+                        <RowDefinition Height="*" />
+                        <RowDefinition Height="auto" />
+                        <RowDefinition Height="auto" />
                     </Grid.RowDefinitions>
                 <Button HorizontalAlignment="Right" Margin="0,8,10,0" Style="{StaticResource LightButtonStyle}" BorderThickness="0"
                         Background="White" Width="24" Height="24" Click="KeyboardPopupClose_Click">
@@ -193,19 +193,10 @@
                 </Button>
                     <TextBox     
                     x:Name="KeyboardInPutTextBox" Grid.Row="1" BorderThickness="0" Background="#F2F3F5" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="45"/>
-                    <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="10">
-                        <TextBlock Text="Font" VerticalAlignment="Center"/>
-                        <ComboBox x:Name="TextName" Width="232" SelectedIndex="0" HorizontalAlignment="Left" VerticalAlignment="Center" 
-                                  Style="{StaticResource ComboBoxStyle1}" Margin="8,0,0,0" SelectionChanged="TextName_SelectionChanged">
-                            <ComboBoxItem Content="Arial"/>
-                            <ComboBoxItem Content="Courier New" IsSelected="True"/>
-                            <ComboBoxItem Content="Times New Roman"/>
-                        </ComboBox>
-                    </StackPanel>
-                    <StackPanel Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,10,10,0">
+                    <StackPanel Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,10,20,10">
                         <common:ColorPickerControl x:Name="TextColorPickerControl" Loaded="TextColorPickerControl_Loaded" ColorChanged="TextColorPickerControl_ColorChanged" TransparentBtnProperty="Collapsed"></common:ColorPickerControl>
                     </StackPanel>
-                    <Grid Grid.Row="3" Margin="11,20,11,0" VerticalAlignment="Top">
+                    <Grid Grid.Row="3" Margin="25,0,0,20" VerticalAlignment="Top">
                         <Button Height="32" Width="82" Style="{StaticResource LightButtonStyle}" Background="#DFE9FF" 
                                 BorderThickness="0" HorizontalAlignment="Left" Content="Clear" Click="KeyboardClear_Click"/>
                         <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">

+ 0 - 8
Demo/Examples/Compdfkit_Tools/DigitalSignature/FillDigitalSignatureControl/FillDigitalSignatureControl.xaml.cs

@@ -558,14 +558,6 @@ namespace Compdfkit_Tools.PDFControl
             Window parentWindow = Window.GetWindow(sender as DependencyObject);
             parentWindow?.Close();
         }
-        
-        private void TextName_SelectionChanged(object sender, SelectionChangedEventArgs e)
-        {
-            if (TextName.SelectedIndex != -1)
-            {
-                KeyboardInPutTextBox.FontFamily = new System.Windows.Media.FontFamily(TextName.SelectionBoxItem.ToString());
-            }
-        }
 
         private void TextColorPickerControl_Loaded(object sender, RoutedEventArgs e)
         {