CPDFSearchResultUI.xaml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <UserControl x:Class="ComPDFKit.Controls.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.Controls.PDFControlUI"
  7. xmlns:convert="clr-namespace:ComPDFKit.Controls.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <convert:ListViewWidthConverter x:Key="ListViewWidthConverter"/>
  13. <convert:BotaResourceConverter x:Key="BotaResourceConverter"></convert:BotaResourceConverter>
  14. </ResourceDictionary>
  15. </UserControl.Resources>
  16. <Grid Background="#FAFCFF">
  17. <ListView Name="ResultListControl" SelectionChanged="ListView_SelectionChanged" VirtualizingPanel.IsVirtualizingWhenGrouping="True"
  18. ScrollViewer.HorizontalScrollBarVisibility="Hidden" BorderThickness="0" SelectionMode="Single" Visibility="Collapsed">
  19. <ListView.GroupStyle>
  20. <GroupStyle>
  21. <GroupStyle.HeaderTemplate>
  22. <DataTemplate>
  23. <StackPanel Background="White" Height="24">
  24. <TextBlock Padding="0,4,12,4" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Right"
  25. FontWeight="SemiBold" FontSize="12" Text="{Binding Name}" FontFamily="Microsoft YaHei" Foreground="#666666 "/>
  26. </StackPanel>
  27. </DataTemplate>
  28. </GroupStyle.HeaderTemplate>
  29. <GroupStyle.Panel>
  30. <ItemsPanelTemplate>
  31. <VirtualizingStackPanel/>
  32. </ItemsPanelTemplate>
  33. </GroupStyle.Panel>
  34. </GroupStyle>
  35. </ListView.GroupStyle>
  36. <ListView.ItemsPanel>
  37. <ItemsPanelTemplate>
  38. <VirtualizingStackPanel Background="#FAFCFF" Margin="-5,0,0,0"></VirtualizingStackPanel>
  39. </ItemsPanelTemplate>
  40. </ListView.ItemsPanel>
  41. <ListView.ItemTemplate>
  42. <ItemContainerTemplate>
  43. <StackPanel>
  44. <RichTextBox Background="Transparent" Foreground="#000000" FontFamily="Microsoft YaHei" FontSize="14" IsReadOnly="True" BorderThickness="0"
  45. Padding="12,6,10,6" local:SearchResultBindHelper.DocumentBind="{Binding BindProperty}"
  46. Width="{Binding ElementName=ResultListControl,Path=ActualWidth,Converter={StaticResource ListViewWidthConverter}}"
  47. VerticalContentAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False" >
  48. </RichTextBox>
  49. </StackPanel>
  50. </ItemContainerTemplate>
  51. </ListView.ItemTemplate>
  52. </ListView>
  53. <TextBlock Name="NoResultText" Foreground="#43474D" FontSize="14" LineHeight="16" VerticalAlignment="Center" HorizontalAlignment="Center"
  54. Text="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Text_NoResult}"></TextBlock>
  55. </Grid>
  56. </UserControl>