CPDFAnnotationListControl.xaml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <UserControl x:Class="ComPDFKit.Controls.PDFControl.CPDFAnnotationListControl"
  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:cpdftoolsui="clr-namespace:ComPDFKit.Controls.PDFControlUI"
  7. xmlns:cpdftools="clr-namespace:ComPDFKit.Controls.PDFControl"
  8. xmlns:common="clr-namespace:ComPDFKit.Controls.Common"
  9. mc:Ignorable="d"
  10. d:DesignHeight="800" d:DesignWidth="300" Background="#fff">
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="../../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
  15. <ResourceDictionary Source="../../../Asset/Styles/MenuItemStyle.xaml"></ResourceDictionary>
  16. </ResourceDictionary.MergedDictionaries>
  17. <common:BotaResourceConverter x:Key="BotaResourceConverter"></common:BotaResourceConverter>
  18. </ResourceDictionary>
  19. </UserControl.Resources>
  20. <Grid>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="auto"></RowDefinition>
  23. <RowDefinition></RowDefinition>
  24. </Grid.RowDefinitions>
  25. <Grid Height="50">
  26. <Grid.ColumnDefinitions>
  27. <ColumnDefinition></ColumnDefinition>
  28. <ColumnDefinition Width="auto"></ColumnDefinition>
  29. <ColumnDefinition Width="auto"></ColumnDefinition>
  30. <ColumnDefinition Width="auto"></ColumnDefinition>
  31. </Grid.ColumnDefinitions>
  32. <TextBlock Text="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Title_Annot}" FontSize="14" Foreground="#42464D" Margin="16,0,0,0" VerticalAlignment="Center"></TextBlock>
  33. <Button x:Name="ExportBtn" Width="40" Height="40" Click="ExportBtn_Click" Style="{StaticResource TransparentButtonStyle}" Grid.Column="1" VerticalAlignment="Center" Margin="8,0,8,0"
  34. ToolTip="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Tooltip_Export}">
  35. <Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#43474D"
  36. Data="M10.6374 2.96457C10.3413 2.6749 9.8613 2.6749 9.56523 2.96457L5.46391 6.97725C5.16784 7.26693 5.16784 7.73659 5.46391 8.02626C5.75999 8.31594 6.24002 8.31594 6.53609 8.02626L9.25012 5.37089L9.25012 12.8272C9.25012 13.2414 9.58591 13.5772 10.0001 13.5772C10.4143 13.5772 10.7501 13.2414 10.7501 12.8272L10.7501 5.17287L13.6665 8.02626C13.9626 8.31594 14.4426 8.31594 14.7387 8.02626C15.0348 7.73659 15.0348 7.26693 14.7387 6.97725L10.6374 2.96457ZM4 15.7516C3.58579 15.7516 3.25 16.0874 3.25 16.5016C3.25 16.9158 3.58579 17.2516 4 17.2516H16C16.4142 17.2516 16.75 16.9158 16.75 16.5016C16.75 16.0874 16.4142 15.7516 16 15.7516H4Z"></Path>
  37. </Button>
  38. <Button x:Name="ImportBtn" Width="40" Height="40" Click="ImportBtn_Click" Style="{StaticResource TransparentButtonStyle}" Grid.Column="2" VerticalAlignment="Center"
  39. ToolTip="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Tooltip_Import}">
  40. <Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#43474D"
  41. Data="M9.56181 13.8733C9.85977 14.1611 10.3429 14.1611 10.6408 13.8733L14.7421 9.91282C15.0401 9.62509 15.0401 9.15858 14.7421 8.87085C14.4442 8.58311 13.9611 8.58311 13.6631 8.87085L10.75 11.6839L10.75 4C10.75 3.58579 10.4142 3.25 10 3.25C9.58581 3.25 9.25002 3.58579 9.25002 4L9.25003 11.4883L6.53951 8.87085C6.24155 8.58311 5.75846 8.58311 5.46049 8.87085C5.16253 9.15858 5.16253 9.62509 5.46049 9.91282L9.56181 13.8733ZM4 15.7543C3.58579 15.7543 3.25 16.0901 3.25 16.5043C3.25 16.9185 3.58579 17.2543 4 17.2543H16C16.4142 17.2543 16.75 16.9185 16.75 16.5043C16.75 16.0901 16.4142 15.7543 16 15.7543H4Z"></Path>
  42. </Button>
  43. <Menu Background="Transparent" BorderThickness="0" Width="40" Height="40" Grid.Column="3">
  44. <Menu.ToolTip>
  45. <Binding Converter="{StaticResource BotaResourceConverter}" ConverterParameter="Tooltip_More"></Binding>
  46. </Menu.ToolTip>
  47. <MenuItem BorderThickness="0" Width="40" Height="40" Padding="0">
  48. <MenuItem.Header>
  49. <Canvas Width="40" Height="40" VerticalAlignment="Center" HorizontalAlignment="Center">
  50. <Path Data="M10 5.5C10.8284 5.5 11.5 4.82843 11.5 4C11.5 3.17157 10.8284 2.5 10 2.5C9.17157 2.5 8.5 3.17157 8.5 4C8.5 4.82843 9.17157 5.5 10 5.5ZM11.5 10C11.5 10.8284 10.8284 11.5 10 11.5C9.17157 11.5 8.5 10.8284 8.5 10C8.5 9.17157 9.17157 8.5 10 8.5C10.8284 8.5 11.5 9.17157 11.5 10ZM11.5 16C11.5 16.8284 10.8284 17.5 10 17.5C9.17157 17.5 8.5 16.8284 8.5 16C8.5 15.1716 9.17157 14.5 10 14.5C10.8284 14.5 11.5 15.1716 11.5 16Z"
  51. Fill="#43474D" Margin="10,10,0,0"/>
  52. </Canvas>
  53. </MenuItem.Header>
  54. <MenuItem Header="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Menu_ExpandAllAnnot}" Style="{StaticResource Sub_MenuItem}">
  55. <MenuItem.Command>
  56. <cpdftools:ExpandAnnotListCommand/>
  57. </MenuItem.Command>
  58. <MenuItem.CommandParameter>
  59. <Binding Path="." RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type cpdftools:CPDFAnnotationListControl}}"/>
  60. </MenuItem.CommandParameter>
  61. </MenuItem>
  62. <MenuItem Header="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Menu_FoldAllAnnot}" Style="{StaticResource Sub_MenuItem}">
  63. <MenuItem.Command>
  64. <cpdftools:FoldAnnotListCommand/>
  65. </MenuItem.Command>
  66. <MenuItem.CommandParameter>
  67. <Binding Path="." RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type cpdftools:CPDFAnnotationListControl}}"/>
  68. </MenuItem.CommandParameter>
  69. </MenuItem>
  70. <MenuItem Header="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Menu_ExpandAllReply}" Style="{StaticResource Sub_MenuItem}">
  71. <MenuItem.Command>
  72. <cpdftools:ExpandAllReplyCommand/>
  73. </MenuItem.Command>
  74. <MenuItem.CommandParameter>
  75. <Binding Path="." RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type cpdftools:CPDFAnnotationListControl}}"/>
  76. </MenuItem.CommandParameter>
  77. </MenuItem>
  78. <MenuItem Header="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Menu_FoldAllReply}" Style="{StaticResource Sub_MenuItem}">
  79. <MenuItem.Command>
  80. <cpdftools:FoldAllReplyCommand/>
  81. </MenuItem.Command>
  82. <MenuItem.CommandParameter>
  83. <Binding Path="." RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type cpdftools:CPDFAnnotationListControl}}"/>
  84. </MenuItem.CommandParameter>
  85. </MenuItem>
  86. <MenuItem Header="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Menu_DelAllAnnot}" Style="{StaticResource Sub_MenuItem}">
  87. <MenuItem.Command>
  88. <cpdftools:DeleteAllAnnotCommand/>
  89. </MenuItem.Command>
  90. <MenuItem.CommandParameter>
  91. <Binding Path="." RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type cpdftools:CPDFAnnotationListControl}}"/>
  92. </MenuItem.CommandParameter>
  93. </MenuItem>
  94. <MenuItem Header="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Menu_DelAllReply}" Style="{StaticResource Sub_MenuItem}">
  95. <MenuItem.Command>
  96. <cpdftools:DeleteAllReplyCommand/>
  97. </MenuItem.Command>
  98. <MenuItem.CommandParameter>
  99. <Binding Path="." RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type cpdftools:CPDFAnnotationListControl}}"/>
  100. </MenuItem.CommandParameter>
  101. </MenuItem>
  102. </MenuItem>
  103. </Menu>
  104. </Grid>
  105. <cpdftoolsui:CPDFAnnotationListUI x:Name="AnnotationList" Grid.Row="1" Loaded="AnnotationList_Loaded" Unloaded="AnnotationList_Unloaded"></cpdftoolsui:CPDFAnnotationListUI>
  106. </Grid>
  107. </UserControl>