SearchContent.xaml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. <UserControl
  2. x:Class="PDF_Master.Views.BOTA.SearchContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:bota="clr-namespace:PDF_Master.ViewModels.BOTA"
  6. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  7. xmlns:customControl="clr-namespace:PDF_Master.CustomControl"
  8. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  9. xmlns:helper="clr-namespace:PDF_Master.Helper"
  10. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  11. xmlns:local="clr-namespace:PDF_Master.Views.BOTA"
  12. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  13. xmlns:prism="http://prismlibrary.com/"
  14. d:DataContext="{d:DesignInstance Type=bota:SearchContentViewModel}"
  15. d:DesignHeight="450"
  16. d:DesignWidth="800"
  17. prism:ViewModelLocator.AutoWireViewModel="True"
  18. KeyDown="UserControl_KeyDown"
  19. Loaded="UserControl_Loaded"
  20. SizeChanged="UserControl_SizeChanged"
  21. mc:Ignorable="d">
  22. <UserControl.Resources>
  23. <convert:WidthConvert x:Key="WidthConvert" />
  24. <convert:BoolToVisible x:Key="BoolToVisible" />
  25. <convert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert" />
  26. <convert:ListCountToVisible x:Key="ListCountToVisible" />
  27. <convert:UnVisivleConvert x:Key="UnVisivleConvert" />
  28. <Style x:Key="ListViewItemGraySelectStyle" TargetType="{x:Type ListViewItem}">
  29. <Setter Property="Visibility" Value="{Binding TextProperty.ItemVisibility}" />
  30. <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
  31. <Setter Property="Control.Padding" Value="0" />
  32. <Setter Property="Control.HorizontalContentAlignment">
  33. <Setter.Value>
  34. <Binding Path="HorizontalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
  35. </Setter.Value>
  36. </Setter>
  37. <Setter Property="Control.VerticalContentAlignment">
  38. <Setter.Value>
  39. <Binding Path="VerticalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
  40. </Setter.Value>
  41. </Setter>
  42. <Setter Property="Panel.Background" Value="#00FFFFFF" />
  43. <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
  44. <Setter Property="Border.BorderThickness" Value="1" />
  45. <Setter Property="FrameworkElement.FocusVisualStyle">
  46. <Setter.Value>
  47. <Style TargetType="{x:Type IFrameworkInputElement}">
  48. <Setter Property="Control.Template">
  49. <Setter.Value>
  50. <ControlTemplate>
  51. <Rectangle
  52. Margin="2"
  53. SnapsToDevicePixels="True"
  54. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  55. StrokeDashArray="1 2"
  56. StrokeThickness="1" />
  57. </ControlTemplate>
  58. </Setter.Value>
  59. </Setter>
  60. </Style>
  61. </Setter.Value>
  62. </Setter>
  63. <Setter Property="Control.Template">
  64. <Setter.Value>
  65. <ControlTemplate TargetType="{x:Type ListViewItem}">
  66. <Border
  67. Name="Bd"
  68. Padding="{TemplateBinding Control.Padding}"
  69. Background="{TemplateBinding Panel.Background}"
  70. BorderBrush="{TemplateBinding Border.BorderBrush}"
  71. BorderThickness="{TemplateBinding Border.BorderThickness}"
  72. CornerRadius="4"
  73. SnapsToDevicePixels="True">
  74. <Border.ContextMenu>
  75. <ContextMenu Visibility="Collapsed">
  76. <MenuItem
  77. Click="Create_Click"
  78. Header="加入新圆形"
  79. Tag="Round" />
  80. <MenuItem
  81. Click="Create_Click"
  82. Header="加入新四边形"
  83. Tag="Rectangle" />
  84. <MenuItem
  85. Click="Create_Click"
  86. Header="加入新高亮"
  87. Tag="Highlight" />
  88. <MenuItem
  89. Click="Create_Click"
  90. Header="加入新下划线"
  91. Tag="Underline" />
  92. <MenuItem
  93. Click="Create_Click"
  94. Header="加入新删除线"
  95. Tag="Strikethrough" />
  96. </ContextMenu>
  97. </Border.ContextMenu>
  98. <ContentPresenter
  99. HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
  100. VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
  101. Content="{TemplateBinding ContentControl.Content}"
  102. ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
  103. ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
  104. SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
  105. </Border>
  106. <ControlTemplate.Triggers>
  107. <MultiTrigger>
  108. <MultiTrigger.Conditions>
  109. <Condition Property="UIElement.IsMouseOver" Value="True" />
  110. </MultiTrigger.Conditions>
  111. <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  112. <Setter TargetName="Bd" Property="Border.BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  113. </MultiTrigger>
  114. <MultiTrigger>
  115. <MultiTrigger.Conditions>
  116. <Condition Property="Selector.IsSelectionActive" Value="False" />
  117. <Condition Property="Selector.IsSelected" Value="True" />
  118. </MultiTrigger.Conditions>
  119. <Setter TargetName="Bd" Property="Panel.Background" Value="#1A477EDE" />
  120. <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
  121. </MultiTrigger>
  122. <MultiTrigger>
  123. <MultiTrigger.Conditions>
  124. <Condition Property="Selector.IsSelectionActive" Value="True" />
  125. <Condition Property="Selector.IsSelected" Value="True" />
  126. </MultiTrigger.Conditions>
  127. <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  128. <Setter TargetName="Bd" Property="Border.BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  129. </MultiTrigger>
  130. <Trigger Property="UIElement.IsEnabled" Value="False">
  131. <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  132. </Trigger>
  133. </ControlTemplate.Triggers>
  134. </ControlTemplate>
  135. </Setter.Value>
  136. </Setter>
  137. </Style>
  138. <Style x:Key="CustomizeMenuItem" TargetType="{x:Type MenuItem}">
  139. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
  140. <Setter Property="Background" Value="Transparent" />
  141. <Setter Property="Height" Value="32" />
  142. <Setter Property="Margin" Value="8,0" />
  143. <Setter Property="Template">
  144. <Setter.Value>
  145. <ControlTemplate TargetType="{x:Type MenuItem}">
  146. <Border
  147. x:Name="Border"
  148. Background="{TemplateBinding Background}"
  149. BorderBrush="{TemplateBinding BorderBrush}"
  150. BorderThickness="0"
  151. CornerRadius="7">
  152. <Grid>
  153. <Grid.ColumnDefinitions>
  154. <ColumnDefinition
  155. x:Name="ColIcon"
  156. Width="Auto"
  157. SharedSizeGroup="MenuItemIconColumnGroup" />
  158. <ColumnDefinition Width="Auto" SharedSizeGroup="MenuTextColumnGroup" />
  159. <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
  160. <ColumnDefinition x:Name="ColNext" Width="auto" />
  161. </Grid.ColumnDefinitions>
  162. <ContentPresenter
  163. x:Name="Icon"
  164. Grid.Column="0"
  165. Margin="5,0"
  166. VerticalAlignment="Center"
  167. ContentSource="Icon" />
  168. <Grid
  169. x:Name="GlyphPanel"
  170. Grid.Column="0"
  171. Margin="5,0"
  172. VerticalAlignment="Center"
  173. Visibility="Hidden">
  174. <Viewbox
  175. Width="18"
  176. Height="18"
  177. VerticalAlignment="Center"
  178. FlowDirection="LeftToRight">
  179. <Path Data="M422.36247 839.786465c-13.320377 13.421684-34.909068 13.421684-48.126091 0l-10.69355-10.800997 0 0-11.398608-11.502985-50.145074-50.544163c-0.097214-0.201591 0-0.500397-0.201591-0.604774L72.380494 533.085224c-13.320377-13.421684-13.320377-35.218106 0-48.535413l72.132854-72.842005c13.319353-13.408381 34.907021-13.408381 48.224328 0l205.814506 209.252815L831.363631 184.208419c13.218046-13.414521 34.806737-13.414521 48.124044 0l72.134901 72.842005c13.317307 13.408381 13.317307 35.113729 0 48.52211L422.36247 839.786465 422.36247 839.786465z" Fill="{TemplateBinding Foreground}" />
  180. </Viewbox>
  181. </Grid>
  182. <ContentPresenter
  183. x:Name="HeaderHost"
  184. Grid.Column="1"
  185. Margin="{TemplateBinding Padding}"
  186. VerticalAlignment="Center"
  187. ContentSource="Header"
  188. RecognizesAccessKey="True" />
  189. <ContentPresenter
  190. x:Name="IGTHost"
  191. Grid.Column="2"
  192. Margin="8,0"
  193. VerticalAlignment="Center"
  194. ContentSource="InputGestureText" />
  195. <Grid
  196. x:Name="ArrowPanel"
  197. Grid.Column="3"
  198. Margin="10,0"
  199. HorizontalAlignment="Right"
  200. VerticalAlignment="Center">
  201. <Path
  202. x:Name="ArrowPanelPath"
  203. HorizontalAlignment="Right"
  204. VerticalAlignment="Center"
  205. Data="M0,0 L0,8 L4,4 z"
  206. Fill="{TemplateBinding Foreground}" />
  207. </Grid>
  208. <Popup
  209. x:Name="SubMenuPopup"
  210. AllowsTransparency="True"
  211. Focusable="false"
  212. IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
  213. Placement="Right">
  214. <Border
  215. x:Name="SubMenuBorder"
  216. Padding="2,2,2,2"
  217. Background="{StaticResource color.sys.layout.mg}"
  218. BorderBrush="#999999"
  219. BorderThickness="0"
  220. CornerRadius="7">
  221. <Grid x:Name="SubMenu" Grid.IsSharedSizeScope="True">
  222. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
  223. </Grid>
  224. </Border>
  225. </Popup>
  226. </Grid>
  227. </Border>
  228. <ControlTemplate.Triggers>
  229. <Trigger Property="Role" Value="TopLevelHeader">
  230. <Setter Property="Padding" Value="6,1" />
  231. <Setter Property="Background" Value="Transparent" />
  232. <Setter TargetName="SubMenuPopup" Property="Placement" Value="Bottom" />
  233. <Setter TargetName="ColIcon" Property="MinWidth" Value="0" />
  234. <Setter TargetName="ColNext" Property="Width" Value="Auto" />
  235. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  236. <Setter TargetName="GlyphPanel" Property="Visibility" Value="Collapsed" />
  237. <Setter TargetName="IGTHost" Property="Visibility" Value="Collapsed" />
  238. <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
  239. </Trigger>
  240. <Trigger Property="IsHighlighted" Value="true">
  241. <Setter TargetName="Border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
  242. <Setter Property="Foreground" Value="{StaticResource color.sys.text.accent.norm}" />
  243. </Trigger>
  244. <MultiTrigger>
  245. <MultiTrigger.Conditions>
  246. <Condition Property="IsHighlighted" Value="True" />
  247. <Condition Property="Role" Value="TopLevelHeader" />
  248. </MultiTrigger.Conditions>
  249. <MultiTrigger.Setters>
  250. <Setter TargetName="Border" Property="Background" Value="#0cffffff" />
  251. </MultiTrigger.Setters>
  252. </MultiTrigger>
  253. <Trigger Property="Role" Value="TopLevelItem">
  254. <Setter Property="Padding" Value="6,1" />
  255. <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
  256. </Trigger>
  257. <Trigger Property="Role" Value="SubmenuHeader">
  258. <Setter Property="Padding" Value="5,2" />
  259. </Trigger>
  260. <Trigger Property="Role" Value="SubmenuItem">
  261. <Setter Property="Padding" Value="5,2" />
  262. <Setter TargetName="ArrowPanel" Property="Visibility" Value="Collapsed" />
  263. </Trigger>
  264. <Trigger Property="Icon" Value="{x:Null}">
  265. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  266. </Trigger>
  267. <Trigger Property="IsChecked" Value="true">
  268. <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
  269. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  270. </Trigger>
  271. <Trigger Property="IsEnabled" Value="false">
  272. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
  273. </Trigger>
  274. </ControlTemplate.Triggers>
  275. </ControlTemplate>
  276. </Setter.Value>
  277. </Setter>
  278. </Style>
  279. <PathGeometry x:Key="Ic_MoreButtonPath" Figures="M5.83333 12.5C8.13452 12.5 10 10.6345 10 8.33333C10 6.03215 8.13452 4.16667 5.83333 4.16667C3.53215 4.16667 1.66667 6.03215 1.66667 8.33333C1.66667 10.6345 3.53215 12.5 5.83333 12.5ZM5.83333 14.1667C6.8191 14.1667 7.74775 13.9222 8.56195 13.4905L12.4581 17.3866L13.6366 16.2081L9.92222 12.4937C10.9989 11.4354 11.6667 9.96235 11.6667 8.33333C11.6667 5.11167 9.05499 2.5 5.83333 2.5C2.61167 2.5 0 5.11167 0 8.33333C0 11.555 2.61167 14.1667 5.83333 14.1667ZM13.5059 7.65166L16.1576 10.3033L18.8092 7.65166L19.9877 8.83017L16.7468 12.0711C16.4214 12.3965 15.8938 12.3965 15.5683 12.0711L12.3274 8.83017L13.5059 7.65166Z" />
  280. <PathGeometry x:Key="Ic_ExpandButtonPath" Figures="M5.99993 7.56427L2.03033 3.59467L0.969666 4.65533L5.4696 9.15526C5.7625 9.44816 6.23737 9.44816 6.53026 9.15526L11.0302 4.65533L9.96954 3.59467L5.99993 7.56427Z" />
  281. <PathGeometry x:Key="Ic_ShrinkButtonPath" Figures="M7.56432 5.99996L3.59467 9.96961L4.65533 11.0303L9.15531 6.53029C9.4482 6.2374 9.4482 5.76252 9.15531 5.46963L4.65533 0.969645L3.59467 2.0303L7.56432 5.99996Z" />
  282. </UserControl.Resources>
  283. <Grid Background="#F3F3F3" MinHeight="400">
  284. <Grid.RowDefinitions>
  285. <RowDefinition Height="auto" />
  286. <RowDefinition Height="auto" />
  287. <RowDefinition />
  288. </Grid.RowDefinitions>
  289. <Grid>
  290. <Grid.ColumnDefinitions>
  291. <ColumnDefinition Width="16" />
  292. <ColumnDefinition Width="*" />
  293. <ColumnDefinition Width="16" />
  294. </Grid.ColumnDefinitions>
  295. <Grid.RowDefinitions>
  296. <RowDefinition Height="13" />
  297. <RowDefinition Height="auto" />
  298. <RowDefinition Height="8" />
  299. <RowDefinition Height="auto" />
  300. <RowDefinition Height="18" />
  301. </Grid.RowDefinitions>
  302. <Grid Grid.Row="1" Grid.Column="1">
  303. <TextBlock
  304. HorizontalAlignment="Left"
  305. VerticalAlignment="Center"
  306. FontSize="14"
  307. Text="Search" />
  308. <Button
  309. Width="45"
  310. Height="24"
  311. HorizontalAlignment="Right"
  312. VerticalAlignment="Center"
  313. Command="{Binding CleanCommand}"
  314. Content="Done"
  315. Style="{StaticResource Btn.cta}"
  316. Visibility="{Binding Completed}" />
  317. </Grid>
  318. <customControl:TextBoxEx
  319. x:Name="SearchText"
  320. Grid.Row="3"
  321. Grid.Column="1"
  322. Height="32"
  323. Padding="14,0,0,0"
  324. HorizontalAlignment="Stretch"
  325. GotFocus="SearchText_GotFocus"
  326. Initialized="TextBoxEx_Initialized"
  327. KeyDown="TextBox_KeyDown"
  328. LostFocus="SearchText_LostFocus"
  329. PlaceholderText="Search PDF"
  330. Text="{Binding SearchTextContext, Mode=TwoWay}">
  331. <customControl:TextBoxEx.ContextMenu>
  332. <ContextMenu Name="ContextSearchText" Width="180">
  333. <MenuItem
  334. x:Name="IgnoreItem"
  335. Header="Ignore Case"
  336. IsCheckable="True"
  337. IsChecked="{Binding CaseInsensitive, Mode=TwoWay}"
  338. Style="{StaticResource CustomizeMenuItem}" />
  339. <Separator x:Name="IgnoreSeparator" Style="{StaticResource HorizontalSeparatorStyle}" />
  340. <Separator x:Name="ClearSeparator" Style="{StaticResource HorizontalSeparatorStyle}" />
  341. <MenuItem
  342. x:Name="ClearItem"
  343. Click="ClearItem_Click"
  344. Header="Clear Search History"
  345. Style="{StaticResource CustomizeMenuItem}" />
  346. </ContextMenu>
  347. </customControl:TextBoxEx.ContextMenu>
  348. </customControl:TextBoxEx>
  349. <customControl:PathButton
  350. Grid.Row="3"
  351. Grid.Column="1"
  352. Width="20"
  353. Height="20"
  354. Margin="8,0,0,0"
  355. HorizontalAlignment="Left"
  356. Click="PathButton_Click"
  357. CornerRadius="4"
  358. Icon="{StaticResource Ic_MoreButtonPath}"
  359. IconFill="#616469"
  360. IconHeight="20"
  361. IconMouseOver="{StaticResource Ic_MoreButtonPath}"
  362. IconMouseOverFill="#616469"
  363. IconPress="{StaticResource Ic_MoreButtonPath}"
  364. IconPressFill="#616469"
  365. IconWidth="20"
  366. MouseDownBackground="{StaticResource color.item-state.sel.bg.lv3}"
  367. MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  368. MouseOverBackground="{StaticResource color.item-state.hov.bg}" />
  369. </Grid>
  370. <Grid
  371. Grid.Row="1"
  372. Margin="10,0,10,0"
  373. Visibility="{Binding ElementName=NoSearch, Path=Visibility, Converter={StaticResource UnVisivleConvert}}">
  374. <TextBlock
  375. Margin="0,0,0,10"
  376. HorizontalAlignment="Left"
  377. VerticalAlignment="Center"
  378. Text="All Result" />
  379. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  380. <TextBlock
  381. Margin="0,0,0,10"
  382. HorizontalAlignment="Right"
  383. VerticalAlignment="Center"
  384. Text="Results:" />
  385. <TextBlock
  386. x:Name="TbCount"
  387. Margin="0,0,0,10"
  388. HorizontalAlignment="Right"
  389. VerticalAlignment="Center"
  390. Text="{Binding SearchCount}" />
  391. </StackPanel>
  392. </Grid>
  393. <Grid Grid.Row="2">
  394. <ListView
  395. Name="SearchResultList"
  396. BorderThickness="0"
  397. ItemContainerStyle="{StaticResource ListViewItemGraySelectStyle}"
  398. ItemsSource="{Binding SearchItemList}"
  399. MouseLeftButtonDown="SearchResultList_MouseLeftButtonDown"
  400. ScrollViewer.HorizontalScrollBarVisibility="Hidden"
  401. SelectionMode="Single"
  402. VirtualizingPanel.IsVirtualizingWhenGrouping="True">
  403. <ListView.GroupStyle>
  404. <GroupStyle>
  405. <GroupStyle.HeaderTemplate>
  406. <DataTemplate>
  407. <Border
  408. Height="32"
  409. Padding="16,5,5,5"
  410. VerticalAlignment="Center"
  411. Background="{StaticResource color.sys.layout.fg.light}">
  412. <Grid VerticalAlignment="Center">
  413. <TextBlock
  414. HorizontalAlignment="Left"
  415. VerticalAlignment="Stretch"
  416. FontFamily="SF Pro Text"
  417. FontSize="14"
  418. FontWeight="Regular"
  419. Foreground="{StaticResource color.sys.text.neutral.lv1}"
  420. Text="{Binding Name}"
  421. TextAlignment="Center" />
  422. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  423. <TextBlock
  424. HorizontalAlignment="Center"
  425. VerticalAlignment="Center"
  426. FontFamily="SF Pro Text"
  427. FontSize="14"
  428. FontWeight="Regular"
  429. Foreground="{StaticResource color.sys.text.neutral.lv3}"
  430. Text="{Binding Items.Count}"
  431. TextAlignment="Center" />
  432. <customControl:PathButton
  433. Width="24"
  434. Height="24"
  435. HorizontalAlignment="Center"
  436. VerticalAlignment="Center"
  437. HorizontalContentAlignment="Center"
  438. VerticalContentAlignment="Center"
  439. Click="BtnExptend_Click"
  440. Icon="{StaticResource Ic_ExpandButtonPath}"
  441. IconChecked="{StaticResource Ic_ShrinkButtonPath}"
  442. IconCheckedFill="#616469"
  443. IconFill="#616469"
  444. IconHeight="12"
  445. IconMouseOver="{StaticResource Ic_ExpandButtonPath}"
  446. IconMouseOverFill="#616469"
  447. IconPress="{StaticResource Ic_ExpandButtonPath}"
  448. IconPressFill="#616469"
  449. IconWidth="12" />
  450. </StackPanel>
  451. </Grid>
  452. </Border>
  453. </DataTemplate>
  454. </GroupStyle.HeaderTemplate>
  455. <GroupStyle.Panel>
  456. <ItemsPanelTemplate>
  457. <VirtualizingStackPanel Visibility="Visible" />
  458. </ItemsPanelTemplate>
  459. </GroupStyle.Panel>
  460. </GroupStyle>
  461. </ListView.GroupStyle>
  462. <ListView.ItemsPanel>
  463. <ItemsPanelTemplate>
  464. <VirtualizingStackPanel Margin="-5,0,0,0" Background="{StaticResource color.sys.layout.mg}" />
  465. </ItemsPanelTemplate>
  466. </ListView.ItemsPanel>
  467. <ListView.ItemTemplate>
  468. <ItemContainerTemplate>
  469. <StackPanel>
  470. <RichTextBox
  471. Width="{Binding ElementName=SearchResultList, Path=ActualWidth, Converter={StaticResource WidthConvert}}"
  472. Padding="12,6,10,6"
  473. VerticalAlignment="Center"
  474. VerticalContentAlignment="Center"
  475. helper:RichTextBoxHelper.DocumentBind="{Binding TextProperty}"
  476. Background="Transparent"
  477. BorderThickness="0"
  478. Cursor="Arrow"
  479. FontFamily="Segoe UI"
  480. FontSize="14"
  481. FontWeight="Regular"
  482. Foreground="{StaticResource color.sys.text.neutral.lv1}"
  483. IsHitTestVisible="False"
  484. IsReadOnly="True" />
  485. </StackPanel>
  486. </ItemContainerTemplate>
  487. </ListView.ItemTemplate>
  488. <i:Interaction.Triggers>
  489. <i:EventTrigger EventName="SelectionChanged">
  490. <i:InvokeCommandAction Command="{Binding SearchChangedCommand}" CommandParameter="{Binding ElementName=SearchResultList, Path=SelectedItems}" />
  491. </i:EventTrigger>
  492. </i:Interaction.Triggers>
  493. </ListView>
  494. </Grid>
  495. <Grid
  496. x:Name="NoSearch"
  497. Grid.Row="0"
  498. Grid.RowSpan="3"
  499. Visibility="{Binding SearchItemList.Count, Converter={StaticResource ListCountToVisible}}">
  500. <StackPanel VerticalAlignment="Center">
  501. <Image
  502. Width="128"
  503. Height="128"
  504. Source="pack://application:,,,/PDF Master;component/Resources/BOTA/no search.png" />
  505. <TextBlock
  506. Height="22"
  507. HorizontalAlignment="Center"
  508. FontFamily="Segoe UI"
  509. FontSize="14"
  510. Text="No search results" />
  511. <TextBlock
  512. Width="168"
  513. HorizontalAlignment="Center"
  514. FontFamily="Segoe UI"
  515. FontSize="12"
  516. Foreground="#94989C"
  517. Text="Search requests can be entered above."
  518. TextAlignment="Center"
  519. TextWrapping="Wrap" />
  520. </StackPanel>
  521. </Grid>
  522. </Grid>
  523. </UserControl>