StampAnnotProperty.xaml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <UserControl
  2. x:Class="PDF_Master.Views.PropertyPanel.AnnotPanel.StampAnnotProperty"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:annotpanel="clr-namespace:PDF_Master.ViewModels.PropertyPanel.AnnotPanel"
  6. xmlns:customcontrol="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:dataconvert="clr-namespace:PDF_Master.DataConvert"
  9. xmlns:dd="clr-namespace:PDFSettings;assembly=PDFSettings"
  10. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  11. xmlns:local="clr-namespace:PDF_Master.Views.PropertyPanel.AnnotPanel"
  12. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  13. xmlns:model="clr-namespace:PDF_Master.Model.AnnotPanel"
  14. Width="260"
  15. d:DataContext="{d:DesignInstance Type=annotpanel:StampAnnotPropertyViewModel}"
  16. Background="{StaticResource color.sys.layout.mg}"
  17. Loaded="UserControl_Loaded"
  18. mc:Ignorable="d">
  19. <UserControl.Resources>
  20. <PathGeometry x:Key="Ic_SettingButtonPath" Figures="M8.24998 1.87558L13.1782 4.72088C13.3329 4.8102 13.4282 4.97526 13.4282 5.15389V10.8445C13.4282 11.0231 13.3329 11.1882 13.1782 11.2775L8.24998 14.1228C8.09528 14.2121 7.90468 14.2121 7.74998 14.1228L2.82178 11.2775C2.66708 11.1882 2.57178 11.0231 2.57178 10.8445V5.15389C2.57178 4.97526 2.66708 4.8102 2.82178 4.72088L7.74998 1.87558C7.90468 1.78626 8.09528 1.78626 8.24998 1.87558ZM6.99998 0.576543C7.61878 0.219277 8.38118 0.219277 8.99998 0.576543L13.9282 3.42184C14.547 3.77911 14.9282 4.43936 14.9282 5.15389V10.8445C14.9282 11.559 14.547 12.2193 13.9282 12.5765L8.99998 15.4218C8.38118 15.7791 7.61878 15.7791 6.99998 15.4218L2.07178 12.5765C1.45298 12.2193 1.07178 11.559 1.07178 10.8445V5.15389C1.07178 4.43936 1.45298 3.77911 2.07178 3.42184L6.99998 0.576543ZM9.99998 7.99919C9.99998 9.10376 9.10455 9.99919 7.99998 9.99919C6.89541 9.99919 5.99998 9.10376 5.99998 7.99919C5.99998 6.89462 6.89541 5.99919 7.99998 5.99919C9.10455 5.99919 9.99998 6.89462 9.99998 7.99919ZM11.5 7.99919C11.5 9.93219 9.93298 11.4992 7.99998 11.4992C6.06698 11.4992 4.49998 9.93219 4.49998 7.99919C4.49998 6.0662 6.06698 4.49919 7.99998 4.49919C9.93298 4.49919 11.5 6.0662 11.5 7.99919Z" />
  21. <dataconvert:BoolToVisible x:Key="BoolToVisible" />
  22. <dataconvert:ListCountToVisible x:Key="ListCountToVisible" />
  23. <dataconvert:UnVisivleConvert x:Key="UnVisivleConvert" />
  24. <Style TargetType="{x:Type TabItem}">
  25. <Setter Property="Width" Value="74.67 " />
  26. <Setter Property="Height" Value="28" />
  27. <Setter Property="BorderThickness" Value="0" />
  28. <Setter Property="Template" Value="{StaticResource Segmented}" />
  29. </Style>
  30. <SolidColorBrush x:Key="Item.MouseOver.Background" Color="#1F26A0DA" />
  31. <SolidColorBrush x:Key="Item.MouseOver.Border" Color="#a826A0Da" />
  32. <SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#3DDADADA" />
  33. <SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="#FFDADADA" />
  34. <SolidColorBrush x:Key="Item.SelectedActive.Background" Color="#3D26A0DA" />
  35. <SolidColorBrush x:Key="Item.SelectedActive.Border" Color="#FF26A0DA" />
  36. </UserControl.Resources>
  37. <Grid>
  38. <Grid.RowDefinitions>
  39. <RowDefinition Height="50" />
  40. <RowDefinition Height="*" />
  41. </Grid.RowDefinitions>
  42. <Grid.ColumnDefinitions>
  43. <ColumnDefinition Width="16" />
  44. <ColumnDefinition Width="*" />
  45. <ColumnDefinition Width="16" />
  46. </Grid.ColumnDefinitions>
  47. <Grid Grid.Column="1">
  48. <Grid.ColumnDefinitions>
  49. <ColumnDefinition Width="*" />
  50. <ColumnDefinition Width="auto" />
  51. </Grid.ColumnDefinitions>
  52. <TextBlock
  53. x:Name="AnnoteTypeTitle"
  54. Margin="0,14"
  55. HorizontalAlignment="Left"
  56. VerticalAlignment="Center"
  57. FontFamily="Segoe UI"
  58. FontSize="14"
  59. FontWeight="SemiBold" />
  60. <customcontrol:PathButton
  61. Grid.Column="1"
  62. Width="24"
  63. Height="24"
  64. Command="{Binding ShowDialogCommand}"
  65. Icon="{StaticResource Ic_SettingButtonPath}"
  66. IconFill="#616469"
  67. IconHeight="16"
  68. IconMouseOver="{StaticResource Ic_SettingButtonPath}"
  69. IconMouseOverFill="#C04CF8"
  70. IconPress="{StaticResource Ic_SettingButtonPath}"
  71. IconPressFill="#C04CF8"
  72. IconWidth="16"
  73. Visibility="{Binding UnStandard, Converter={StaticResource BoolToVisible}}" />
  74. </Grid>
  75. <Grid Grid.Row="1" Grid.Column="1">
  76. <ListBox
  77. Height="auto"
  78. VerticalAlignment="Top"
  79. Background="Transparent"
  80. BorderThickness="0"
  81. ItemsSource="{Binding StandardStampList}"
  82. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  83. SelectionMode="Single">
  84. <ListBox.ItemTemplate>
  85. <DataTemplate>
  86. <Grid>
  87. <Grid.ContextMenu>
  88. <ContextMenu>
  89. <MenuItem Header="{Binding T_MenuRightMenuStampAnnot_Export}">
  90. <MenuItem
  91. x:Name="SavePNG"
  92. Click="Save_Click"
  93. Header="{Binding T_MenuRightMenuStampAnnotExport_PNG}"
  94. Tag="PNG" />
  95. <MenuItem
  96. x:Name="SavePDF"
  97. Click="Save_Click"
  98. Header="{Binding T_MenuRightMenuStampAnnotExport_PDF}"
  99. Tag="PDF" />
  100. </MenuItem>
  101. </ContextMenu>
  102. </Grid.ContextMenu>
  103. <Image
  104. Height="40"
  105. Source="{Binding SourcePath}"
  106. Stretch="Uniform" />
  107. </Grid>
  108. </DataTemplate>
  109. </ListBox.ItemTemplate>
  110. <ListBox.ItemContainerStyle>
  111. <Style TargetType="ListBoxItem">
  112. <Setter Property="Height" Value="65" />
  113. <Setter Property="Padding" Value="8" />
  114. <Setter Property="HorizontalContentAlignment" Value="Center" />
  115. <Setter Property="Template">
  116. <Setter.Value>
  117. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  118. <Border
  119. x:Name="Bd"
  120. Padding="{TemplateBinding Padding}"
  121. Background="{TemplateBinding Background}"
  122. BorderBrush="{TemplateBinding BorderBrush}"
  123. BorderThickness="{TemplateBinding BorderThickness}"
  124. CornerRadius="8"
  125. SnapsToDevicePixels="true">
  126. <ContentPresenter
  127. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  128. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  129. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  130. </Border>
  131. <ControlTemplate.Triggers>
  132. <MultiTrigger>
  133. <MultiTrigger.Conditions>
  134. <Condition Property="IsMouseOver" Value="True" />
  135. </MultiTrigger.Conditions>
  136. <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  137. <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.item-state.hov.bg}" />
  138. </MultiTrigger>
  139. <MultiTrigger>
  140. <MultiTrigger.Conditions>
  141. <Condition Property="Selector.IsSelectionActive" Value="False" />
  142. <Condition Property="IsSelected" Value="True" />
  143. </MultiTrigger.Conditions>
  144. <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.SelectedInactive.Background}" />
  145. <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Item.SelectedInactive.Border}" />
  146. </MultiTrigger>
  147. <MultiTrigger>
  148. <MultiTrigger.Conditions>
  149. <Condition Property="Selector.IsSelectionActive" Value="True" />
  150. <Condition Property="IsSelected" Value="True" />
  151. </MultiTrigger.Conditions>
  152. <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  153. <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  154. </MultiTrigger>
  155. <Trigger Property="IsEnabled" Value="False">
  156. <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  157. </Trigger>
  158. </ControlTemplate.Triggers>
  159. </ControlTemplate>
  160. </Setter.Value>
  161. </Setter>
  162. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown" />
  163. </Style>
  164. </ListBox.ItemContainerStyle>
  165. </ListBox>
  166. </Grid>
  167. <!--<TabControl Padding="0" Grid.Column="1" BorderThickness="0" Grid.Row="1" Name="StampTabControl" SelectedIndex="{Binding TabControlSelectedIndex,Mode=TwoWay}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Style="{StaticResource FormTabControl}">
  168. <TabItem x:Name="TabStandard"
  169. Header="Standard"
  170. FontFamily="Segoe UI"
  171. HorizontalContentAlignment="Center"
  172. FontSize="12"
  173. IsSelected="True">
  174. <Grid>
  175. <ListBox ItemsSource="{Binding StandardStampList}" SelectionMode="Single" Height="auto" VerticalAlignment="Top" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  176. <ListBox.ItemTemplate>
  177. <DataTemplate>
  178. <Grid>
  179. <Grid.ContextMenu>
  180. <ContextMenu>
  181. <MenuItem Header="导出图章">
  182. <MenuItem x:Name="SavePNG" Header="PNG" Tag="PNG" Click="Save_Click" />
  183. <MenuItem x:Name="SavePDF" Header="PDF" Tag="PDF" Click="Save_Click" />
  184. </MenuItem>
  185. </ContextMenu>
  186. </Grid.ContextMenu>
  187. <Image Source="{Binding SourcePath}" Stretch="Uniform" Height="40" />
  188. </Grid>
  189. </DataTemplate>
  190. </ListBox.ItemTemplate>
  191. <ListBox.ItemContainerStyle>
  192. <Style TargetType="ListBoxItem">
  193. <Setter Property="Height" Value="65" />
  194. <Setter Property="Padding" Value="8" />
  195. <Setter Property="HorizontalContentAlignment" Value="Center" />
  196. <Setter Property="Template">
  197. <Setter.Value>
  198. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  199. <Border x:Name="Bd" CornerRadius="8" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
  200. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  201. </Border>
  202. <ControlTemplate.Triggers>
  203. <MultiTrigger>
  204. <MultiTrigger.Conditions>
  205. <Condition Property="IsMouseOver" Value="True" />
  206. </MultiTrigger.Conditions>
  207. <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}" />
  208. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}" />
  209. </MultiTrigger>
  210. <MultiTrigger>
  211. <MultiTrigger.Conditions>
  212. <Condition Property="Selector.IsSelectionActive" Value="False" />
  213. <Condition Property="IsSelected" Value="True" />
  214. </MultiTrigger.Conditions>
  215. <Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Background}" />
  216. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Border}" />
  217. </MultiTrigger>
  218. <MultiTrigger>
  219. <MultiTrigger.Conditions>
  220. <Condition Property="Selector.IsSelectionActive" Value="True" />
  221. <Condition Property="IsSelected" Value="True" />
  222. </MultiTrigger.Conditions>
  223. <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  224. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.sel.border.lv3}" />
  225. </MultiTrigger>
  226. <Trigger Property="IsEnabled" Value="False">
  227. <Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  228. </Trigger>
  229. </ControlTemplate.Triggers>
  230. </ControlTemplate>
  231. </Setter.Value>
  232. </Setter>
  233. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown" />
  234. </Style>
  235. </ListBox.ItemContainerStyle>
  236. </ListBox>
  237. </Grid>
  238. </TabItem>
  239. <TabItem x:Name="TabDydamic"
  240. Header="Dynamic"
  241. FontFamily="Segoe UI" Foreground="#FF666666"
  242. HorizontalContentAlignment="Center"
  243. FontSize="12">
  244. <ListBox Tag="Dynamic" DataContext="{Binding}" ItemsSource="{Binding DynamicStampList}" Loaded="DydamicListBox_Loaded" SelectionMode="Single" Height="auto" VerticalAlignment="Top" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  245. <ListBox.ItemTemplate>
  246. <DataTemplate>
  247. <Grid>
  248. <Image Source="{Binding ImageSource}" Stretch="Uniform" Height="48" />
  249. </Grid>
  250. </DataTemplate>
  251. </ListBox.ItemTemplate>
  252. <ListBox.ItemContainerStyle>
  253. <Style TargetType="ListBoxItem">
  254. <Setter Property="Height" Value="65" />
  255. <Setter Property="Padding" Value="8" />
  256. <Setter Property="HorizontalContentAlignment" Value="Center" />
  257. <Setter Property="Template">
  258. <Setter.Value>
  259. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  260. <Border x:Name="Bd" CornerRadius="8" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
  261. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  262. </Border>
  263. <ControlTemplate.Triggers>
  264. <MultiTrigger>
  265. <MultiTrigger.Conditions>
  266. <Condition Property="IsMouseOver" Value="True" />
  267. </MultiTrigger.Conditions>
  268. <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}" />
  269. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}" />
  270. </MultiTrigger>
  271. <MultiTrigger>
  272. <MultiTrigger.Conditions>
  273. <Condition Property="Selector.IsSelectionActive" Value="False" />
  274. <Condition Property="IsSelected" Value="True" />
  275. </MultiTrigger.Conditions>
  276. <Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Background}" />
  277. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Border}" />
  278. </MultiTrigger>
  279. <MultiTrigger>
  280. <MultiTrigger.Conditions>
  281. <Condition Property="Selector.IsSelectionActive" Value="True" />
  282. <Condition Property="IsSelected" Value="True" />
  283. </MultiTrigger.Conditions>
  284. <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  285. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.sel.border.lv3}" />
  286. </MultiTrigger>
  287. <Trigger Property="IsEnabled" Value="False">
  288. <Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  289. </Trigger>
  290. </ControlTemplate.Triggers>
  291. </ControlTemplate>
  292. </Setter.Value>
  293. </Setter>
  294. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown" />
  295. </Style>
  296. </ListBox.ItemContainerStyle>
  297. </ListBox>
  298. </TabItem>
  299. <TabItem x:Name="TabCustom"
  300. Header="Custom"
  301. FontFamily="Segoe UI" Foreground="#FF666666"
  302. FontSize="12"
  303. HorizontalContentAlignment="Center">
  304. <Grid>
  305. <StackPanel VerticalAlignment="Center" x:Name="NoStampStackPanel" Visibility="{Binding CustomStampList.Count, Converter={StaticResource ListCountToVisible}}">
  306. <Image Source="pack://application:,,,/PDF Master;component/Resources/PropertyPanel/nostamp.png" />
  307. <TextBlock Text="No custom stamp created" FontSize="14" FontFamily="Segoe UI" Height="22" HorizontalAlignment="Center" />
  308. <TextBlock Width="168" FontSize="12" FontFamily="Segoe UI" TextWrapping="Wrap" Foreground="#94989C" HorizontalAlignment="Center">
  309. <Run Text="Click the" />
  310. <Run Text="Add button" FontWeight="Bold" />
  311. <Run Text="in the upper right corner to create a new stamp." />
  312. </TextBlock>
  313. </StackPanel>
  314. <ListBox Name="CusListbox" Margin="0 0 0 56" Visibility="{Binding ElementName=NoStampStackPanel,Path=Visibility,Converter={StaticResource UnVisivleConvert}}"
  315. VerticalAlignment="Top"
  316. Height="auto"
  317. BorderThickness="0"
  318. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  319. ItemsSource="{Binding CustomStampList}"
  320. SelectedIndex="{Binding CusListboxIndex,Mode=TwoWay}">
  321. <ListBox.ItemTemplate>
  322. <HierarchicalDataTemplate DataType="{x:Type model:Stamp}">
  323. <Grid>
  324. <Grid.ContextMenu>
  325. <ContextMenu>
  326. <MenuItem x:Name="Delete" Header="删除图章" Click="Delete_Click" />
  327. <MenuItem x:Name="DeleteAll" Header="删除全部图章" Click="DeleteAll_Click" />
  328. <MenuItem Header="导出图章">
  329. <MenuItem x:Name="SavePNG" Header="PNG" Tag="PNG" Click="Save_Click" />
  330. <MenuItem x:Name="SavePDF" Header="PDF" Tag="PDF" Click="Save_Click" />
  331. </MenuItem>
  332. <MenuItem Header="编辑文字图章" Click="Editor_Click" Visibility="Collapsed" />
  333. </ContextMenu>
  334. </Grid.ContextMenu>
  335. <StackPanel Orientation="Horizontal">
  336. <Image Source="{Binding SourcePath}" />
  337. <Button HorizontalAlignment="Right" VerticalAlignment="Top" x:Name="DeleteIcon" Width="20" Height="20" Click="Delete_Click" Visibility="Hidden" />
  338. </StackPanel>
  339. </Grid>
  340. <HierarchicalDataTemplate.Triggers>
  341. <Trigger Property="IsMouseOver" Value="True">
  342. <Setter TargetName="DeleteIcon" Property="Visibility" Value="Visible" />
  343. </Trigger>
  344. </HierarchicalDataTemplate.Triggers>
  345. </HierarchicalDataTemplate>
  346. </ListBox.ItemTemplate>
  347. <ListBox.ItemContainerStyle>
  348. <Style TargetType="ListBoxItem">
  349. <Setter Property="Height" Value="65" />
  350. <Setter Property="Padding" Value="8" />
  351. <Setter Property="Template">
  352. <Setter.Value>
  353. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  354. <Border x:Name="Bd" CornerRadius="8" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
  355. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  356. </Border>
  357. <ControlTemplate.Triggers>
  358. <MultiTrigger>
  359. <MultiTrigger.Conditions>
  360. <Condition Property="IsMouseOver" Value="True" />
  361. </MultiTrigger.Conditions>
  362. <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}" />
  363. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}" />
  364. </MultiTrigger>
  365. <MultiTrigger>
  366. <MultiTrigger.Conditions>
  367. <Condition Property="Selector.IsSelectionActive" Value="False" />
  368. <Condition Property="IsSelected" Value="True" />
  369. </MultiTrigger.Conditions>
  370. <Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Background}" />
  371. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Border}" />
  372. </MultiTrigger>
  373. <MultiTrigger>
  374. <MultiTrigger.Conditions>
  375. <Condition Property="Selector.IsSelectionActive" Value="True" />
  376. <Condition Property="IsSelected" Value="True" />
  377. </MultiTrigger.Conditions>
  378. <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  379. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.sel.border.lv3}" />
  380. </MultiTrigger>
  381. <Trigger Property="IsEnabled" Value="False">
  382. <Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  383. </Trigger>
  384. </ControlTemplate.Triggers>
  385. </ControlTemplate>
  386. </Setter.Value>
  387. </Setter>
  388. <Setter Property="HorizontalContentAlignment" Value="Center" />
  389. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown" />
  390. </Style>
  391. </ListBox.ItemContainerStyle>
  392. </ListBox>
  393. </Grid>
  394. </TabItem>
  395. </TabControl>-->
  396. </Grid>
  397. </UserControl>