CPDFBookmarkResultUI.xaml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <UserControl x:Class="Compdfkit_Tools.PDFControlUI.CPDFBookmarkResultUI"
  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.PDFControlUI"
  7. xmlns:convert="clr-namespace:Compdfkit_Tools.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800" Background="#FAFCFF">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <convert:ListViewWidthConverter x:Key="ListViewWidthConverter"/>
  13. <convert:BotaResourceConverter x:Key="BotaResourceConverter"/>
  14. </ResourceDictionary>
  15. </UserControl.Resources>
  16. <Grid>
  17. <ListView Name="ResultListControl" VirtualizingPanel.IsVirtualizingWhenGrouping="True"
  18. SelectionChanged="ResultListControl_SelectionChanged"
  19. ScrollViewer.HorizontalScrollBarVisibility="Hidden" BorderThickness="0" SelectionMode="Single"
  20. MouseLeftButtonDown="ResultListControl_MouseLeftButtonDown" Background="#01000000">
  21. <ListView.GroupStyle>
  22. <GroupStyle>
  23. <GroupStyle.HeaderTemplate>
  24. <DataTemplate>
  25. <StackPanel Background="#EFF4FF" Height="30" Orientation="Horizontal">
  26. <TextBlock Padding="16,4,0,4" FontWeight="SemiBold" FontSize="12"
  27. FontFamily="Microsoft YaHei" Foreground="#43474D "
  28. Text="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Text_Page}"></TextBlock>
  29. <TextBlock HorizontalAlignment="Left" Padding="10,4,0,4"
  30. FontWeight="SemiBold" FontSize="12" FontFamily="Microsoft YaHei" Foreground="#43474D" Text="{Binding Name}">
  31. </TextBlock>
  32. </StackPanel>
  33. </DataTemplate>
  34. </GroupStyle.HeaderTemplate>
  35. <GroupStyle.Panel>
  36. <ItemsPanelTemplate>
  37. <VirtualizingStackPanel/>
  38. </ItemsPanelTemplate>
  39. </GroupStyle.Panel>
  40. </GroupStyle>
  41. </ListView.GroupStyle>
  42. <ListView.ItemsPanel>
  43. <ItemsPanelTemplate>
  44. <VirtualizingStackPanel Background="#EFF4FF" Margin="-5,0,0,0"></VirtualizingStackPanel>
  45. </ItemsPanelTemplate>
  46. </ListView.ItemsPanel>
  47. <ListView.ItemTemplate>
  48. <ItemContainerTemplate>
  49. <Grid Background="#01FFFFFF" Width="{Binding ElementName=ResultListControl,Path=ActualWidth,Converter={StaticResource ListViewWidthConverter}}" MinHeight="30"
  50. MouseEnter="Grid_MouseEnter" MouseLeave="Grid_MouseLeave" Tag="{Binding}" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
  51. <Grid.ColumnDefinitions>
  52. <ColumnDefinition Width="*"></ColumnDefinition>
  53. <ColumnDefinition Width="auto"></ColumnDefinition>
  54. </Grid.ColumnDefinitions>
  55. <TextBox MinHeight="20" VerticalAlignment="Center" Margin="20,0,5,0" IsReadOnly="True" BorderThickness="0" IsHitTestVisible="False"
  56. AcceptsReturn="True" Background="Transparent" Foreground="#43474D" Text="{Binding BindProperty.BookmarkTitle}"></TextBox>
  57. <Border VerticalAlignment="Center" Grid.Column="1" Padding="10,5,10,5" Visibility="Collapsed">
  58. <StackPanel Orientation="Horizontal">
  59. <Border MouseLeftButtonDown="EditBorder_Click" Background="#01FFFFFF" ToolTip="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Tooltip_Edit}">
  60. <Viewbox Width="16" Height="16">
  61. <Path Fill="#43474D">
  62. <Path.Data>
  63. M7.71094 15L15.2031 7.5L9.5 1.79688L0.890625 10.4062C0.765625 10.5312 0.670573 10.6784 0.605469 10.8477C0.540365 11.0169 0.507812 11.1927
  64. 0.507812 11.375C0.507812 11.5573 0.540365 11.7331 0.605469 11.9023C0.670573 12.0716 0.768229 12.2214 0.898438 12.3516L3.53906
  65. 15H7.71094ZM8.5 12.7969L4.20312 8.5L9.5 3.20312L13.7969 7.5L8.5 12.7969ZM3.95312 14H7.28906L7.79688 13.5L3.5 9.20312L1.60156
  66. 11.1016C1.53385 11.1693 1.5 11.2604 1.5 11.375C1.5 11.4896 1.53646 11.5833 1.60938 11.6562L3.95312 14ZM16 15V14H10.0182L9
  67. 15H16ZM1.06227 14L2 15H0V14H1.06227Z
  68. </Path.Data>
  69. </Path>
  70. </Viewbox>
  71. </Border>
  72. <Border MouseLeftButtonDown="DelBorder_Click" Background="#01FFFFFF" ToolTip="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Tooltip_Delete}">
  73. <Viewbox Margin="10,0,0,0" Width="16" Height="16">
  74. <Path Fill="#43474D">
  75. <Path.Data>
  76. M11.1998 1.19995V3.59995H15.1998V4.39995H13.1998V14.8H2.7998V4.39995H0.799805V3.59995H4.7998V1.19995H11.1998ZM3.5998
  77. 4.39995V14H12.3998V4.39995H3.5998ZM10.3998 1.99995V3.59995H5.5998V1.99995H10.3998ZM6.7998 6.39995V12H5.9998V6.39995H6.7998ZM9.9998
  78. 12V6.39995H9.1998V12H9.9998Z
  79. </Path.Data>
  80. </Path>
  81. </Viewbox>
  82. </Border>
  83. </StackPanel>
  84. </Border>
  85. </Grid>
  86. </ItemContainerTemplate>
  87. </ListView.ItemTemplate>
  88. </ListView>
  89. <TextBlock Name="NoResultText" Text="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Text_NoBookmarks}" Foreground="#43474D" FontSize="14" LineHeight="16" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
  90. </Grid>
  91. </UserControl>