ConfidenceControl.xaml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <UserControl x:Class="ComPDFKit.Controls.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.Controls.PDFControl"
  7. xmlns:common="clr-namespace:ComPDFKit.Controls.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. <common:SigResourceConverter x:Key="SigResourceConverter"></common:SigResourceConverter>
  29. </ResourceDictionary>
  30. </UserControl.Resources>
  31. <Grid>
  32. <Grid.RowDefinitions>
  33. <RowDefinition Height="112"></RowDefinition>
  34. <RowDefinition Height="auto"></RowDefinition>
  35. </Grid.RowDefinitions>
  36. <Grid Background="#ffffff" Margin="20,0,0,0" Panel.ZIndex="1" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top">
  37. <TextBlock Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Tip_TrustTo}" FontWeight="Bold" FontSize="16"></TextBlock>
  38. </Grid>
  39. <Border Margin="12" BorderBrush="#33000000" BorderThickness="1" >
  40. <StackPanel VerticalAlignment="Center" Margin="20,0,0,0">
  41. <StackPanel Orientation="Horizontal" Margin="0,0,0,6">
  42. <Canvas Height="20" Width="20">
  43. <ContentControl Content="{Binding IsTrusted, Converter={StaticResource ConfidenceStatusToPathConverter}}" />
  44. </Canvas>
  45. <TextBlock Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Trust_Sign}" VerticalAlignment="Center"></TextBlock>
  46. </StackPanel>
  47. <StackPanel Orientation="Horizontal" Margin="0,0,0,6">
  48. <Canvas Height="20" Width="20">
  49. <ContentControl Content="{Binding IsTrusted, Converter={StaticResource ConfidenceStatusToPathConverter}}" />
  50. </Canvas>
  51. <TextBlock Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Trust_Cert}" VerticalAlignment="Center"></TextBlock>
  52. </StackPanel>
  53. </StackPanel>
  54. </Border>
  55. <Button Grid.Row="1" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_AddTrust}" IsEnabled="{Binding IsTrusted, Converter={StaticResource ReverseBoolConverter}}" Click="TrustCertificateButton_OnClick" Height="32" Width="230" HorizontalAlignment="Right" Margin="0,0,12,12"></Button>
  56. </Grid>
  57. </UserControl>