CPDFBookmarkResultUI.xaml 6.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. </ResourceDictionary>
  14. </UserControl.Resources>
  15. <Grid>
  16. <ListView Name="ResultListControl" VirtualizingPanel.IsVirtualizingWhenGrouping="True"
  17. SelectionChanged="ResultListControl_SelectionChanged"
  18. ScrollViewer.HorizontalScrollBarVisibility="Hidden" BorderThickness="0" SelectionMode="Single"
  19. MouseLeftButtonDown="ResultListControl_MouseLeftButtonDown" Background="#01000000">
  20. <ListView.GroupStyle>
  21. <GroupStyle>
  22. <GroupStyle.HeaderTemplate>
  23. <DataTemplate>
  24. <StackPanel Background="#EFF4FF" Height="30" Orientation="Horizontal">
  25. <TextBlock Padding="16,4,0,4" FontWeight="SemiBold" FontSize="12"
  26. FontFamily="Segoe UI" Foreground="#43474D ">Page</TextBlock>
  27. <TextBlock HorizontalAlignment="Left" Padding="10,4,0,4"
  28. FontWeight="SemiBold" FontSize="12" FontFamily="Segoe UI" Foreground="#43474D" Text="{Binding Name}">
  29. </TextBlock>
  30. </StackPanel>
  31. </DataTemplate>
  32. </GroupStyle.HeaderTemplate>
  33. <GroupStyle.Panel>
  34. <ItemsPanelTemplate>
  35. <VirtualizingStackPanel/>
  36. </ItemsPanelTemplate>
  37. </GroupStyle.Panel>
  38. </GroupStyle>
  39. </ListView.GroupStyle>
  40. <ListView.ItemsPanel>
  41. <ItemsPanelTemplate>
  42. <VirtualizingStackPanel Background="#EFF4FF" Margin="-5,0,0,0"></VirtualizingStackPanel>
  43. </ItemsPanelTemplate>
  44. </ListView.ItemsPanel>
  45. <ListView.ItemTemplate>
  46. <ItemContainerTemplate>
  47. <Grid Background="#01FFFFFF" Width="{Binding ElementName=ResultListControl,Path=ActualWidth,Converter={StaticResource ListViewWidthConverter}}" MinHeight="30"
  48. MouseEnter="Grid_MouseEnter" MouseLeave="Grid_MouseLeave" Tag="{Binding}" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
  49. <Grid.ColumnDefinitions>
  50. <ColumnDefinition Width="*"></ColumnDefinition>
  51. <ColumnDefinition Width="auto"></ColumnDefinition>
  52. </Grid.ColumnDefinitions>
  53. <TextBox MinHeight="20" VerticalAlignment="Center" Margin="20,0,5,0" IsReadOnly="True" BorderThickness="0" IsHitTestVisible="False"
  54. AcceptsReturn="True" Background="Transparent" Foreground="#43474D" Text="{Binding BindProperty.BookmarkTitle}"></TextBox>
  55. <Border VerticalAlignment="Center" Grid.Column="1" Padding="10,5,10,5" Visibility="Collapsed">
  56. <StackPanel Orientation="Horizontal">
  57. <Border MouseLeftButtonDown="EditBorder_Click" Background="#01FFFFFF">
  58. <Viewbox Width="16" Height="16">
  59. <Path Fill="#43474D">
  60. <Path.Data>
  61. 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
  62. 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
  63. 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
  64. 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
  65. 15H16ZM1.06227 14L2 15H0V14H1.06227Z
  66. </Path.Data>
  67. </Path>
  68. </Viewbox>
  69. </Border>
  70. <Border MouseLeftButtonDown="DelBorder_Click" Background="#01FFFFFF">
  71. <Viewbox Margin="10,0,0,0" Width="16" Height="16">
  72. <Path Fill="#43474D">
  73. <Path.Data>
  74. M11.1998 1.19995V3.59995H15.1998V4.39995H13.1998V14.8H2.7998V4.39995H0.799805V3.59995H4.7998V1.19995H11.1998ZM3.5998
  75. 4.39995V14H12.3998V4.39995H3.5998ZM10.3998 1.99995V3.59995H5.5998V1.99995H10.3998ZM6.7998 6.39995V12H5.9998V6.39995H6.7998ZM9.9998
  76. 12V6.39995H9.1998V12H9.9998Z
  77. </Path.Data>
  78. </Path>
  79. </Viewbox>
  80. </Border>
  81. </StackPanel>
  82. </Border>
  83. </Grid>
  84. </ItemContainerTemplate>
  85. </ListView.ItemTemplate>
  86. </ListView>
  87. <TextBlock Name="NoResultText" Foreground="#43474D" FontSize="14" LineHeight="16" VerticalAlignment="Center" HorizontalAlignment="Center">No Bookmark</TextBlock>
  88. </Grid>
  89. </UserControl>