SaveCerficateControl.xaml 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.SaveCerficateControl"
  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_Tools.PDFControl"
  7. xmlns:common="clr-namespace:Compdfkit_Tools.Common"
  8. mc:Ignorable="d"
  9. Height="310" Width="550">
  10. <UserControl.Resources>
  11. <common:TextLengthToVisibilityConverter x:Key="TextLengthToVisibilityConverter"></common:TextLengthToVisibilityConverter>
  12. </UserControl.Resources>
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="auto"></RowDefinition>
  16. <RowDefinition Height="auto"></RowDefinition>
  17. <RowDefinition Height="auto"></RowDefinition>
  18. <RowDefinition Height="auto"></RowDefinition>
  19. <RowDefinition Height="auto"></RowDefinition>
  20. <RowDefinition></RowDefinition>
  21. </Grid.RowDefinitions>
  22. <TextBlock TextWrapping="Wrap" FontSize="14" Foreground="#000000" Margin="10,20,10,20" Height="40"
  23. Text="Save the Self-Signed Digital ID to A File">
  24. </TextBlock>
  25. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,0,0,8">
  26. <TextBlock Text="Save Location" Foreground="#43474D" FontSize="14" VerticalAlignment="Center" Margin="10,0,10,0" HorizontalAlignment="Left" Width="135" FontFamily="Segoe UI"></TextBlock>
  27. <Grid>
  28. <TextBox Width="258" Height="28" x:Name="FileNameText" VerticalContentAlignment="Center" VerticalAlignment="Center" IsReadOnly="True" Text="{Binding FilePath, Mode =TwoWay}"/>
  29. <TextBlock Text="Select a file" Margin="8" VerticalAlignment="Center" Visibility="{Binding ElementName=FileNameText, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False" Foreground="#BBB"></TextBlock>
  30. </Grid>
  31. <Button x:Name="SelectFileBtn" Content="Browse" Width="90" Height="28" FontSize="14" FontFamily="Segoe UI" Margin="8,0,0,0" Click="SelectFileBtn_Click"></Button>
  32. </StackPanel>
  33. <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="10,0,0,8">
  34. <TextBlock Foreground="#43474D" Width="135" FontSize="14" FontFamily="Segoe UI" Text="Set A Password" VerticalAlignment="Top" Margin="10,5,10,0"></TextBlock>
  35. <Grid>
  36. <PasswordBox Name="SetPasswordPbx" Padding="5,0,0,0" Width="258" Height="28" VerticalContentAlignment="Center" VerticalAlignment="Center" PasswordChanged="SetPasswordPbx_OnPasswordChanged"></PasswordBox>
  37. <TextBlock x:Name="PasswordTextBlock" Text="Please enter your password" Margin="8" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="#BBB"></TextBlock>
  38. </Grid>
  39. </StackPanel>
  40. <StackPanel Grid.Row="3" Orientation="Horizontal" Margin="10,0,0,8">
  41. <TextBlock Foreground="#43474D" Width="135" FontSize="14" FontFamily="Segoe UI" Text="Confirm the Password" VerticalAlignment="Top" Margin="10,5,10,0"></TextBlock>
  42. <Grid>
  43. <PasswordBox Name="ConfirmPasswordPbx" Padding="5,0,0,0" Width="258" Height="28" VerticalContentAlignment="Center" VerticalAlignment="Center" PasswordChanged="ConfirmPasswordPbx_OnPasswordChanged"></PasswordBox>
  44. <TextBlock x:Name="ConfirmPasswordTextBlock" Text="Enter the password again" Margin="8" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="#BBB"></TextBlock>
  45. </Grid>
  46. </StackPanel>
  47. <TextBlock Name="ErrorTipsText" Foreground="Red" Margin="167,4,0,0" Grid.Row="4"></TextBlock>
  48. <Grid Grid.Row="5">
  49. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="24">
  50. <Button x:Name="CancelBtn" Content="Cancel" Margin="0,0,10,0" Width="112" Height="32" BorderThickness="1" Click="CancelBtn_Click"></Button>
  51. <Button x:Name="DoneBtn" Content="Finish" Width="112" Height="32" BorderThickness="1" Click="DoneBtn_Click"></Button>
  52. </StackPanel>
  53. </Grid>
  54. </Grid>
  55. </UserControl>