SearchResultControl.xaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <UserControl x:Class="compdfkit_tools.SearchResultControl"
  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"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800">
  9. <Grid>
  10. <ListView Name="ResultListControl" SelectionChanged="ListView_SelectionChanged" VirtualizingPanel.IsVirtualizingWhenGrouping="True"
  11. ScrollViewer.HorizontalScrollBarVisibility="Hidden" BorderThickness="0" SelectionMode="Single">
  12. <ListView.GroupStyle>
  13. <GroupStyle>
  14. <GroupStyle.HeaderTemplate>
  15. <DataTemplate>
  16. <StackPanel Background="#E2E3E6" Height="24">
  17. <TextBlock Padding="0,4,12,4" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Right"
  18. FontWeight="SemiBold" FontSize="12" Text="{Binding Name}" FontFamily="Segoe UI" Foreground="#666666 "/>
  19. </StackPanel>
  20. </DataTemplate>
  21. </GroupStyle.HeaderTemplate>
  22. <GroupStyle.Panel>
  23. <ItemsPanelTemplate>
  24. <VirtualizingStackPanel/>
  25. </ItemsPanelTemplate>
  26. </GroupStyle.Panel>
  27. </GroupStyle>
  28. </ListView.GroupStyle>
  29. <ListView.ItemsPanel>
  30. <ItemsPanelTemplate>
  31. <VirtualizingStackPanel Background="White" Margin="-5,0,0,0"></VirtualizingStackPanel>
  32. </ItemsPanelTemplate>
  33. </ListView.ItemsPanel>
  34. <ListView.ItemTemplate>
  35. <ItemContainerTemplate>
  36. <StackPanel>
  37. <RichTextBox Background="Transparent" Foreground="#000000" FontFamily="Segoe UI" FontSize="14" IsReadOnly="True" BorderThickness="0"
  38. Padding="12,6,10,6" local:SearchResultBindHelper.DocumentBind="{Binding BindProperty}"
  39. VerticalContentAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False" >
  40. </RichTextBox>
  41. </StackPanel>
  42. </ItemContainerTemplate>
  43. </ListView.ItemTemplate>
  44. </ListView>
  45. </Grid>
  46. </UserControl>