CPDFSearchResultUI.xaml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <UserControl x:Class="compdfkit_tools.PDFControlUI.CPDFSearchResultUI"
  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">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <convert:ListViewWidthConvert x:Key="ListViewWidthConvert"/>
  13. </ResourceDictionary>
  14. </UserControl.Resources>
  15. <Grid>
  16. <ListView Name="ResultListControl" SelectionChanged="ListView_SelectionChanged" VirtualizingPanel.IsVirtualizingWhenGrouping="True"
  17. ScrollViewer.HorizontalScrollBarVisibility="Hidden" BorderThickness="0" SelectionMode="Single">
  18. <ListView.GroupStyle>
  19. <GroupStyle>
  20. <GroupStyle.HeaderTemplate>
  21. <DataTemplate>
  22. <StackPanel Background="#E2E3E6" Height="24">
  23. <TextBlock Padding="0,4,12,4" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Right"
  24. FontWeight="SemiBold" FontSize="12" Text="{Binding Name}" FontFamily="Segoe UI" Foreground="#666666 "/>
  25. </StackPanel>
  26. </DataTemplate>
  27. </GroupStyle.HeaderTemplate>
  28. <GroupStyle.Panel>
  29. <ItemsPanelTemplate>
  30. <VirtualizingStackPanel/>
  31. </ItemsPanelTemplate>
  32. </GroupStyle.Panel>
  33. </GroupStyle>
  34. </ListView.GroupStyle>
  35. <ListView.ItemsPanel>
  36. <ItemsPanelTemplate>
  37. <VirtualizingStackPanel Background="White" Margin="-5,0,0,0"></VirtualizingStackPanel>
  38. </ItemsPanelTemplate>
  39. </ListView.ItemsPanel>
  40. <ListView.ItemTemplate>
  41. <ItemContainerTemplate>
  42. <StackPanel>
  43. <RichTextBox Background="Transparent" Foreground="#000000" FontFamily="Segoe UI" FontSize="14" IsReadOnly="True" BorderThickness="0"
  44. Padding="12,6,10,6" local:SearchResultBindHelper.DocumentBind="{Binding BindProperty}"
  45. Width="{Binding ElementName=ResultListControl,Path=ActualWidth,Converter={StaticResource ListViewWidthConvert}}"
  46. VerticalContentAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False" >
  47. </RichTextBox>
  48. </StackPanel>
  49. </ItemContainerTemplate>
  50. </ListView.ItemTemplate>
  51. </ListView>
  52. </Grid>
  53. </UserControl>