CPDFAnnotationPreviewerControl.xaml 6.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <UserControl x:Class="ComPDFKit.Controls.PDFControl.CPDFAnnotationPreviewerControl"
  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:cpdfcommon="clr-namespace:ComPDFKit.Controls.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="100" d:DesignWidth="260">
  10. <Border BorderBrush="#E2E3E6" BorderThickness="1" Background="#FFFFFF">
  11. <Grid>
  12. <Grid x:Name="MarkupGrid" VerticalAlignment="Center" Visibility="Collapsed">
  13. <TextBlock Name="SampleText" Text="Sample" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontFamily="Microsoft YaHei" FontSize="20"></TextBlock>
  14. <Path x:Name="HighlightPath" HorizontalAlignment="Center" VerticalAlignment="Bottom" Stroke="Green" StrokeThickness="25" Visibility="Collapsed" Panel.ZIndex="-1">
  15. <Path.Data>
  16. <LineGeometry StartPoint="0,0" EndPoint="70, 0"></LineGeometry>
  17. </Path.Data>
  18. </Path>
  19. <Path x:Name="UnderlinePath" HorizontalAlignment="Center" VerticalAlignment="Bottom" Stroke="Black" StrokeThickness="2" Visibility="Collapsed">
  20. <Path.Data>
  21. <LineGeometry StartPoint="0,0" EndPoint="70,0"></LineGeometry>
  22. </Path.Data>
  23. </Path>
  24. <Path x:Name="StrikeoutPath" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Red" StrokeThickness="2" Visibility="Collapsed" Margin="0,6,0,0">
  25. <Path.Data>
  26. <LineGeometry StartPoint="0,0" EndPoint="70,0"></LineGeometry>
  27. </Path.Data>
  28. </Path>
  29. <Path x:Name="SquigglyPath" HorizontalAlignment="Center" VerticalAlignment="Bottom" Stroke="Blue" StrokeThickness="2" Visibility="Collapsed" Margin="0,0,0,-2">
  30. <Path.Data>
  31. M1.5 4L3.16829 2.15912C4.17683 1.04625 5.95378 1.14315 6.83534 2.35908L6.9375 2.5C7.83135 3.73289 9.66865 3.73289 10.5625 2.5V2.5C11.4563 1.26711 13.2937 1.26711 14.1875 2.5V2.5C15.0813 3.73289 16.9187 3.73289 17.8125 2.5V2.5C18.7063 1.26711 20.5437 1.26711 21.4375 2.5V2.5C22.3313 3.73289 24.1687 3.73289 25.0625 2.5V2.5C25.9563 1.26711 27.7937 1.26711 28.6875 2.5V2.5C29.5813 3.73289 31.4187 3.73289 32.3125 2.5V2.5C33.2063 1.26711 35.0437 1.26711 35.9375 2.5V2.5C36.8313 3.73289 38.6687 3.73289 39.5625 2.5V2.5C40.4563 1.26711 42.2937 1.26711 43.1875 2.5V2.5C44.0813 3.73289 45.9187 3.73289 46.8125 2.5V2.5C47.7063 1.26711 49.5437 1.26711 50.4375 2.5V2.5C51.3313 3.73289 53.1687 3.73289 54.0625 2.5V2.5C54.9563 1.26711 56.7937 1.26711 57.6875 2.5V2.5C58.5813 3.73289 60.4187 3.73289 61.3125 2.5L61.4147 2.35908C62.2962 1.14315 64.0732 1.04625 65.0817 2.15912L66.75 4
  32. </Path.Data>
  33. </Path>
  34. </Grid>
  35. <Grid x:Name="FreehandGrid" Visibility="Collapsed">
  36. <Path x:Name="SharpPath" Opacity="1" StrokeThickness="2" Stroke="Black" Width="50" Height="40" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="78,10,0,0">
  37. <Path.Data>
  38. <PathGeometry>
  39. <PathFigure StartPoint="0,20">
  40. <PolyBezierSegment Points="17.5,8 32.5,32 50,20" />
  41. </PathFigure>
  42. </PathGeometry>
  43. </Path.Data>
  44. <Path.RenderTransform>
  45. <TransformGroup>
  46. <ScaleTransform ScaleX="2" ScaleY="2" />
  47. </TransformGroup>
  48. </Path.RenderTransform>
  49. </Path>
  50. </Grid>
  51. <Grid x:Name="FreeTextGrid" Visibility="Collapsed">
  52. <TextBlock Name="FreeText" Text="Sample" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontFamily="Microsoft YaHei" FontSize="20"></TextBlock>
  53. </Grid>
  54. <Grid x:Name="ShapeGrid" Visibility="Collapsed">
  55. <Rectangle x:Name="Rectangle" Width="100" Height="50" Stroke="Red" StrokeThickness="2" Fill="Transparent" Visibility="Collapsed"/>
  56. <Ellipse x:Name="Ellipse" Width="70" Height="70" Stroke="Red" StrokeThickness="2" Fill="Transparent" StrokeDashArray="" Visibility="Collapsed"/>
  57. <Path x:Name="Line" Stroke="Black" StrokeThickness="2" Width="70" Height="70" Visibility="Collapsed"></Path>
  58. </Grid>
  59. <Grid x:Name="NoteGrid" Visibility="Collapsed">
  60. <Path x:Name="NotePath" Stroke="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="Red">
  61. <Path.Data>
  62. M25.5795 0.800049H0.420898V20H5.13814V24.8L13.0002 20H25.5795V0.800049ZM5.13795 5.6001H14.5724V8.0001H5.13795V5.6001ZM5.13795 11.2001H20.8621V13.6001H5.13795V11.2001Z
  63. </Path.Data>
  64. </Path>
  65. </Grid>
  66. <Grid x:Name="StampGrid" Visibility="Collapsed">
  67. <Image Margin="10" x:Name="StampImage"></Image>
  68. </Grid>
  69. <Grid x:Name="gdPolygon" Visibility="Collapsed">
  70. <Path Stroke="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="Black">
  71. <Path.Data>
  72. M24.7273 23.2727H8.72729C3.91419 23.2727 0 19.3586 0 14.5455C0.00552784 12.5867 0.667305 10.6864 1.87963 9.14788C3.09195 7.60941 4.78488 6.52158 6.688 6.05817C7.48868 4.25647 8.79432 2.72541 10.447 1.65024C12.0996 0.57507 14.0284 0.00187249 16 0C21.1651 0 25.4444 3.86619 26.0961 8.85673C27.7564 9.17689 29.2536 10.0648 30.3308 11.3682C31.408 12.6715 31.9982 14.3091 32 16C32 20.0102 28.7375 23.2727 24.7273 23.2727ZM9.08364 7.89673C8.98631 8.13157 8.82913 8.3368 8.62777 8.49196C8.4264 8.64713 8.18789 8.74682 7.936 8.78108C6.54427 8.97521 5.26941 9.66525 4.34584 10.7243C3.42227 11.7834 2.91208 13.1403 2.90908 14.5455C2.90908 17.7542 5.51854 20.3637 8.72729 20.3637H24.7273C27.1331 20.3637 29.091 18.4058 29.091 16C29.091 13.5942 27.1331 11.6364 24.7273 11.6364C24.3415 11.6364 23.9716 11.4831 23.6988 11.2103C23.426 10.9376 23.2727 10.5676 23.2727 10.1818C23.2727 6.17163 20.0102 2.90908 16 2.90908C14.4961 2.91037 13.0294 3.37703 11.8012 4.24503C10.573 5.11304 9.64358 6.33984 9.14037 7.75709C9.12322 7.80434 9.1043 7.85091 9.08364 7.89673Z
  73. </Path.Data>
  74. </Path>
  75. </Grid>
  76. </Grid>
  77. </Border>
  78. </UserControl>