ConfidenceControl.xaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.ConfidenceControl"
  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. d:DesignHeight="150" d:DesignWidth="600" x:Name="UserControl1">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <Viewbox x:Key="ValidPath" Width="20" Height="20" x:Shared="False">
  13. <Canvas Width="20" Height="20">
  14. <Path Data="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5ZM9.74283 12.9801L13.9095 7.98014L12.7572 7.01986L9.11627 11.3889L7.197 9.46967L6.13634 10.5303L8.63634 13.0303L9.21707 13.6111L9.74283 12.9801Z"
  15. Fill="#3CCD75"/>
  16. </Canvas>
  17. </Viewbox>
  18. <Viewbox x:Key="InvalidPath" Width="20" Height="20" x:Shared="False">
  19. <Canvas Width="20" Height="20">
  20. <Path Data="M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z"
  21. Fill="#FF6666"/>
  22. <Path Data="M12 8L8 12" Stroke="White" StrokeThickness="1.5" StrokeLineJoin="Round"/>
  23. <Path Data="M8 8L12 12" Stroke="White" StrokeThickness="1.5" StrokeLineJoin="Round"/>
  24. </Canvas>
  25. </Viewbox>
  26. <local:ConfidenceStatusToPathConverter x:Key="ConfidenceStatusToPathConverter" />
  27. <common:ReverseBoolConverter x:Key="ReverseBoolConverter" />
  28. </ResourceDictionary>
  29. </UserControl.Resources>
  30. <Grid>
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="112"></RowDefinition>
  33. <RowDefinition Height="auto"></RowDefinition>
  34. </Grid.RowDefinitions>
  35. <Grid Background="#ffffff" Margin="20,0,0,0" Panel.ZIndex="1" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top">
  36. <TextBlock Text="This Certificate Is Trusted to" FontWeight="Bold" FontSize="16"></TextBlock>
  37. </Grid>
  38. <Border Margin="12" BorderBrush="#33000000" BorderThickness="1" >
  39. <StackPanel VerticalAlignment="Center" Margin="20,0,0,0">
  40. <StackPanel Orientation="Horizontal" Margin="0,0,0,6">
  41. <Canvas Height="20" Width="20">
  42. <ContentControl Content="{Binding IsTrusted, Converter={StaticResource ConfidenceStatusToPathConverter}}" />
  43. </Canvas>
  44. <TextBlock Text="Sign document or data" VerticalAlignment="Center"></TextBlock>
  45. </StackPanel>
  46. <StackPanel Orientation="Horizontal" Margin="0,0,0,6">
  47. <Canvas Height="20" Width="20">
  48. <ContentControl Content="{Binding IsTrusted, Converter={StaticResource ConfidenceStatusToPathConverter}}" />
  49. </Canvas>
  50. <TextBlock Text="Certify document" VerticalAlignment="Center"></TextBlock>
  51. </StackPanel>
  52. </StackPanel>
  53. </Border>
  54. <Button Grid.Row="1" Content="Add to Trusted Certificates" IsEnabled="{Binding IsTrusted, Converter={StaticResource ReverseBoolConverter}}" Click="TrustCertificateButton_OnClick" Height="32" Width="230" HorizontalAlignment="Right" Margin="0,0,12,12"></Button>
  55. </Grid>
  56. </UserControl>