AddExistedCertificationControl.xaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.AddExistedCertificationControl"
  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="277" Width="470">
  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></RowDefinition>
  19. </Grid.RowDefinitions>
  20. <TextBlock TextWrapping="Wrap" FontSize="14" Foreground="#000000" Margin="10,20,10,20" Height="40"
  21. Text="Browse a digital ID file. Digital ID cards are password-protected. If you do not know the password, you cannot obtain a digital ID card.">
  22. </TextBlock>
  23. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,0,10,8">
  24. <TextBlock Text="Certificate File" Foreground="#43474D" FontSize="14" VerticalAlignment="Center" Margin="10,0,10,0" HorizontalAlignment="Left" Width="88" FontFamily="Segoe UI"></TextBlock>
  25. <Grid IsEnabled="{Binding InputEnable}">
  26. <TextBox Width="238" Height="28" x:Name="FileNameTxt" VerticalContentAlignment="Center" VerticalAlignment="Center" IsReadOnly="True" TextChanged="FileNameTxt_OnTextChanged"/>
  27. <TextBlock Text="Select a file" Margin="8" VerticalAlignment="Center" Visibility="{Binding ElementName=FileNameTxt, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False" Foreground="#BBB"></TextBlock>
  28. </Grid>
  29. <Button x:Name="SelectFileBtn" Content="Upload" Width="90" Height="28" FontSize="14" FontFamily="Segoe UI" Margin="8,0,0,0" Click="SelectFileBtn_Click"></Button>
  30. </StackPanel>
  31. <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="10,0,0,8">
  32. <TextBlock Foreground="#43474D" Width="88" FontSize="14" FontFamily="Segoe UI" Text="Password" VerticalAlignment="Top" Margin="10,5,10,0"></TextBlock>
  33. <StackPanel Margin="0,0,0,0">
  34. <Grid>
  35. <PasswordBox Name="PasswordBoxTxt" Padding="5,0,0,0" Width="238" Height="28" VerticalContentAlignment="Center" VerticalAlignment="Center" PasswordChanged="PasswordBoxTxt_OnPasswordChanged"></PasswordBox>
  36. <TextBlock x:Name="PasswordTextBlock" Text="Please enter your password" Margin="8" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="#BBB"></TextBlock>
  37. </Grid>
  38. <TextBlock Name="ErrorTipsText" Foreground="Red" Margin="0,4,0,0"></TextBlock>
  39. </StackPanel>
  40. </StackPanel>
  41. <Grid Grid.Row="4">
  42. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="24">
  43. <Button x:Name="CancelBtn" Content="Cancel" Margin="0,0,10,0" Width="112" Height="32" BorderThickness="1" Click="CancelBtn_Click"></Button>
  44. <Button x:Name="DoneBtn" Content="OK" Width="112" Height="32" BorderThickness="1" IsEnabled="{Binding CanContinue}" Click="DoneBtn_Click"></Button>
  45. </StackPanel>
  46. </Grid>
  47. </Grid>
  48. </UserControl>