CPDFSearchResultUI.xaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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:ListViewWidthConverter x:Key="ListViewWidthConverter"/>
  13. </ResourceDictionary>
  14. </UserControl.Resources>
  15. <Grid Background="#FAFCFF">
  16. <ListView Name="ResultListControl" SelectionChanged="ListView_SelectionChanged" VirtualizingPanel.IsVirtualizingWhenGrouping="True"
  17. ScrollViewer.HorizontalScrollBarVisibility="Hidden" BorderThickness="0" SelectionMode="Single" Visibility="Collapsed">
  18. <ListView.GroupStyle>
  19. <GroupStyle>
  20. <GroupStyle.HeaderTemplate>
  21. <DataTemplate>
  22. <StackPanel Background="White" 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="#FAFCFF" 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 ListViewWidthConverter}}"
  46. VerticalContentAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False" >
  47. </RichTextBox>
  48. </StackPanel>
  49. </ItemContainerTemplate>
  50. </ListView.ItemTemplate>
  51. </ListView>
  52. <TextBlock Name="NoResultText" Foreground="#43474D" FontSize="14" LineHeight="16" VerticalAlignment="Center" HorizontalAlignment="Center">No Results</TextBlock>
  53. </Grid>
  54. </UserControl>