SaveCertificateControl.xaml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <UserControl x:Class="ComPDFKit.Controls.PDFControl.SaveCertificateControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:ComPDFKit.Controls.PDFControl"
  7. xmlns:common="clr-namespace:ComPDFKit.Controls.Common"
  8. mc:Ignorable="d"
  9. Height="310" Width="550">
  10. <UserControl.Resources>
  11. <common:TextLengthToVisibilityConverter x:Key="TextLengthToVisibilityConverter"></common:TextLengthToVisibilityConverter>
  12. <common:SigResourceConverter x:Key="SigResourceConverter"></common:SigResourceConverter>
  13. </UserControl.Resources>
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="auto"></RowDefinition>
  17. <RowDefinition Height="auto"></RowDefinition>
  18. <RowDefinition Height="auto"></RowDefinition>
  19. <RowDefinition Height="auto"></RowDefinition>
  20. <RowDefinition Height="auto"></RowDefinition>
  21. <RowDefinition></RowDefinition>
  22. </Grid.RowDefinitions>
  23. <TextBlock TextWrapping="Wrap" FontSize="14" Foreground="#000000" Margin="10,20,10,20" Height="40"
  24. Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Title_SaveSig}">
  25. </TextBlock>
  26. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,0,0,8">
  27. <TextBlock Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Tip_Save}" Foreground="#43474D" FontSize="14" VerticalAlignment="Center" Margin="10,0,10,0" HorizontalAlignment="Left" Width="148" FontFamily="Microsoft YaHei"></TextBlock>
  28. <Grid>
  29. <TextBox Width="258" Height="28" x:Name="FileNameText" VerticalContentAlignment="Center" VerticalAlignment="Center" IsReadOnly="True" Text="{Binding FilePath, Mode =TwoWay}"/>
  30. <TextBlock Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Holder_SelectFile}" Margin="8" VerticalAlignment="Center" Visibility="{Binding ElementName=FileNameText, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False" Foreground="#BBB"></TextBlock>
  31. </Grid>
  32. <Button x:Name="SelectFileBtn" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Browse}" Width="90" Height="28" FontSize="14" FontFamily="Microsoft YaHei" Margin="8,0,0,0" Click="SelectFileBtn_Click"></Button>
  33. </StackPanel>
  34. <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="10,0,0,8">
  35. <TextBlock Foreground="#43474D" Width="148" FontSize="14" FontFamily="Microsoft YaHei" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Tip_SetPassword}" VerticalAlignment="Top" Margin="10,5,10,0"></TextBlock>
  36. <Grid>
  37. <PasswordBox Name="SetPasswordPbx" Padding="5,0,0,0" Width="258" Height="28" VerticalContentAlignment="Center" VerticalAlignment="Center" PasswordChanged="SetPasswordPbx_OnPasswordChanged"></PasswordBox>
  38. <TextBlock x:Name="PasswordTextBlock" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Holder_SetPassword}" Margin="8" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="#BBB"></TextBlock>
  39. </Grid>
  40. </StackPanel>
  41. <StackPanel Grid.Row="3" Orientation="Horizontal" Margin="10,0,0,8">
  42. <TextBlock Width="148" Foreground="#43474D" FontSize="14" FontFamily="Microsoft YaHei" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Tip_Confirm}" VerticalAlignment="Top" Margin="10,5,10,0"></TextBlock>
  43. <Grid>
  44. <PasswordBox Name="ConfirmPasswordPbx" Padding="5,0,0,0" Width="258" Height="28" VerticalContentAlignment="Center" VerticalAlignment="Center" PasswordChanged="ConfirmPasswordPbx_OnPasswordChanged"></PasswordBox>
  45. <TextBlock x:Name="ConfirmPasswordTextBlock" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Holder_ConfirmPassword}" Margin="8" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="#BBB"></TextBlock>
  46. </Grid>
  47. </StackPanel>
  48. <TextBlock Name="ErrorTipsText" Foreground="Red" Margin="167,4,0,0" Grid.Row="4"></TextBlock>
  49. <Grid Grid.Row="5">
  50. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="24">
  51. <Button x:Name="CancelBtn" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Cancel}" Margin="0,0,10,0" Width="112" Height="32" BorderThickness="1" Click="CancelBtn_Click"></Button>
  52. <Button x:Name="DoneBtn" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Finish}" Width="112" Height="32" BorderThickness="1" Click="DoneBtn_Click"></Button>
  53. </StackPanel>
  54. </Grid>
  55. </Grid>
  56. </UserControl>