App.xaml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. <Application x:Class="Практическая__5.App"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="clr-namespace:Практическая__5"
  5. StartupUri="windowsFolder/MainWindow.xaml">
  6. <Application.Resources>
  7. <Style x:Key="BTUsually" TargetType="Button">
  8. <Style.Setters>
  9. <Setter Property="Padding" Value="10 5"/>
  10. <Setter Property="Margin" Value="2.5 10 2.5 5"/>
  11. <Setter Property="FontSize" Value="15"/>
  12. <Setter Property="FontWeight" Value="Bold"/>
  13. <Setter Property="Foreground" Value="White"/>
  14. <Setter Property="Background" Value="#226F54"/>
  15. <Setter Property="Cursor" Value="Hand"/>
  16. <Setter Property="Template">
  17. <Setter.Value>
  18. <ControlTemplate TargetType="Button">
  19. <Border CornerRadius="7.5" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" Margin="{TemplateBinding Margin}">
  20. <ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  21. </Border>
  22. </ControlTemplate>
  23. </Setter.Value>
  24. </Setter>
  25. </Style.Setters>
  26. <Style.Triggers>
  27. <Trigger Property="IsMouseOver" Value="True">
  28. <Setter Property="Background" Value="#559972"/>
  29. </Trigger>
  30. </Style.Triggers>
  31. </Style>
  32. <Style x:Key="BTnoBack" TargetType="Button">
  33. <Style.Setters>
  34. <Setter Property="Padding" Value="5"/>
  35. <Setter Property="Margin" Value="0"/>
  36. <Setter Property="FontSize" Value="15"/>
  37. <Setter Property="FontWeight" Value="Bold"/>
  38. <Setter Property="Foreground" Value="#b6ad90"/>
  39. <Setter Property="Background" Value="Transparent"/>
  40. <Setter Property="Cursor" Value="Hand"/>
  41. <Setter Property="Template">
  42. <Setter.Value>
  43. <ControlTemplate TargetType="Button">
  44. <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" Margin="{TemplateBinding Margin}">
  45. <ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  46. </Border>
  47. </ControlTemplate>
  48. </Setter.Value>
  49. </Setter>
  50. </Style.Setters>
  51. <Style.Triggers>
  52. <Trigger Property="IsMouseOver" Value="True">
  53. <Setter Property="Foreground" Value="#559972"/>
  54. </Trigger>
  55. </Style.Triggers>
  56. </Style>
  57. <Style x:Key="BTnoBackNavigate" TargetType="Button">
  58. <Style.Setters>
  59. <Setter Property="Padding" Value="0"/>
  60. <Setter Property="Margin" Value="10 5 0 5"/>
  61. <Setter Property="FontSize" Value="13"/>
  62. <Setter Property="FontWeight" Value="Bold"/>
  63. <Setter Property="Foreground" Value="#b6ad90"/>
  64. <Setter Property="Background" Value="Transparent"/>
  65. <Setter Property="HorizontalAlignment" Value="Left"/>
  66. <Setter Property="Cursor" Value="Hand"/>
  67. <Setter Property="Template">
  68. <Setter.Value>
  69. <ControlTemplate TargetType="Button">
  70. <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" Margin="{TemplateBinding Margin}">
  71. <ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  72. </Border>
  73. </ControlTemplate>
  74. </Setter.Value>
  75. </Setter>
  76. </Style.Setters>
  77. <Style.Triggers>
  78. <Trigger Property="IsMouseOver" Value="True">
  79. <Setter Property="Foreground" Value="#559972"/>
  80. </Trigger>
  81. </Style.Triggers>
  82. </Style>
  83. <Style x:Key="TBxRegUser" TargetType="TextBox">
  84. <Style.Setters>
  85. <Setter Property="Padding" Value="1"/>
  86. <Setter Property="Margin" Value="0"/>
  87. <Setter Property="FontWeight" Value="Medium"/>
  88. <Setter Property="FontSize" Value="14"/>
  89. <Setter Property="Foreground" Value="#43291f"/>
  90. <Setter Property="BorderThickness" Value="0"/>
  91. </Style.Setters>
  92. <Style.Triggers>
  93. <Trigger Property="IsMouseOver" Value="True">
  94. <Setter Property="Foreground" Value="#226F54"/>
  95. </Trigger>
  96. <Trigger Property="IsKeyboardFocused" Value="True">
  97. <Setter Property="Foreground" Value="#226F54"/>
  98. </Trigger>
  99. </Style.Triggers>
  100. </Style>
  101. <Style x:Key="TBkOtherTextClick" TargetType="TextBlock">
  102. <Style.Setters>
  103. <Setter Property="Padding" Value="1"/>
  104. <Setter Property="Margin" Value="0"/>
  105. <Setter Property="FontWeight" Value="Bold"/>
  106. <Setter Property="FontSize" Value="14"/>
  107. <Setter Property="TextWrapping" Value="Wrap"/>
  108. <Setter Property="Foreground" Value="#b6ad90"/>
  109. <Setter Property="HorizontalAlignment" Value="Center"/>
  110. </Style.Setters>
  111. </Style>
  112. <Style x:Key="TBkHeader" TargetType="TextBlock">
  113. <Style.Setters>
  114. <Setter Property="Padding" Value="5"/>
  115. <Setter Property="FontWeight" Value="Medium"/>
  116. <Setter Property="FontSize" Value="25"/>
  117. <Setter Property="TextWrapping" Value="Wrap"/>
  118. <Setter Property="Foreground" Value="#226F54"/>
  119. <Setter Property="HorizontalAlignment" Value="Center"/>
  120. </Style.Setters>
  121. </Style>
  122. <Style x:Key="GBRegUser" TargetType="GroupBox">
  123. <Style.Setters>
  124. <Setter Property="Width" Value="350"/>
  125. <Setter Property="Padding" Value="-1"/>
  126. <Setter Property="Margin" Value="2"/>
  127. <Setter Property="FontWeight" Value="Bold"/>
  128. <Setter Property="FontSize" Value="14"/>
  129. <Setter Property="Foreground" Value="#43291f"/>
  130. <Setter Property="BorderBrush" Value="#43291f"/>
  131. <Setter Property="BorderThickness" Value="1"/>
  132. </Style.Setters>
  133. </Style>
  134. <Style x:Key="DPRegUser" TargetType="DatePicker">
  135. <Style.Setters>
  136. <Setter Property="FontWeight" Value="Medium"/>
  137. <Setter Property="FontSize" Value="14"/>
  138. <Setter Property="BorderThickness" Value="0"/>
  139. </Style.Setters>
  140. <Style.Triggers>
  141. <Trigger Property="IsMouseOver" Value="True">
  142. <Setter Property="Foreground" Value="#226F54"/>
  143. </Trigger>
  144. <Trigger Property="IsKeyboardFocused" Value="True">
  145. <Setter Property="Foreground" Value="#226F54"/>
  146. </Trigger>
  147. </Style.Triggers>
  148. </Style>
  149. <Style x:Key="PBRegUser" TargetType="PasswordBox">
  150. <Style.Setters>
  151. <Setter Property="Padding" Value="1"/>
  152. <Setter Property="Margin" Value="0"/>
  153. <Setter Property="FontWeight" Value="Medium"/>
  154. <Setter Property="FontSize" Value="15"/>
  155. <Setter Property="Foreground" Value="#43291f"/>
  156. <Setter Property="BorderThickness" Value="0"/>
  157. </Style.Setters>
  158. <Style.Triggers>
  159. <Trigger Property="IsMouseOver" Value="True">
  160. <Setter Property="Foreground" Value="#226F54"/>
  161. </Trigger>
  162. <Trigger Property="IsKeyboardFocused" Value="True">
  163. <Setter Property="Foreground" Value="#226F54"/>
  164. </Trigger>
  165. </Style.Triggers>
  166. </Style>
  167. <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
  168. <Grid>
  169. <Grid.ColumnDefinitions>
  170. <ColumnDefinition/>
  171. <ColumnDefinition Width="30"/>
  172. </Grid.ColumnDefinitions>
  173. <Border Grid.ColumnSpan="2" SnapsToDevicePixels="true">
  174. </Border>
  175. <Border Grid.Column="1">
  176. <Path x:Name="Arrow"
  177. Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z"
  178. Fill="#43291f"
  179. Stretch="Fill"
  180. Height="7"
  181. Width="10"
  182. HorizontalAlignment="Center"
  183. VerticalAlignment="Center"/>
  184. </Border>
  185. </Grid>
  186. </ControlTemplate>
  187. <Style x:Key="CBRegUser" TargetType="ComboBox">
  188. <Style.Setters>
  189. <Setter Property="Height" Value="30"/>
  190. <Setter Property="FontSize" Value="14"/>
  191. <Setter Property="Padding" Value="1"/>
  192. <Setter Property="Margin" Value="1.5"/>
  193. <Setter Property="FontWeight" Value="Medium"/>
  194. <Setter Property="FontSize" Value="15"/>
  195. <Setter Property="Foreground" Value="#43291f"/>
  196. <Setter Property="BorderThickness" Value="0"/>
  197. <Setter Property="Background" Value="Transparent"/>
  198. <Setter Property="Cursor" Value="Hand"/>
  199. <Setter Property="Margin" Value="0 0 0 0"/>
  200. <Setter Property="Template">
  201. <Setter.Value>
  202. <ControlTemplate TargetType="{x:Type ComboBox}">
  203. <Border CornerRadius="5" BorderThickness="0" Padding="5"
  204. Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
  205. <Grid>
  206. <ToggleButton x:Name="ToggleButton"
  207. Template="{StaticResource ComboBoxToggleButton}"
  208. Grid.Column="2"
  209. Focusable="False"
  210. ClickMode="Press"
  211. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
  212. <ContentPresenter x:Name="ContentSite"
  213. IsHitTestVisible="False"
  214. Content="{TemplateBinding SelectedItem}"
  215. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  216. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  217. Margin="0 0 25 0"
  218. VerticalAlignment="Center"
  219. HorizontalAlignment="Left"
  220. IsEnabled="True"/>
  221. <Label x:Name="Watermark"
  222. VerticalAlignment="Center"
  223. HorizontalAlignment="Left"
  224. Foreground="#b6ad90"
  225. Visibility="Collapsed"
  226. Padding="0 0 0 0"
  227. Content="{TemplateBinding Tag}"
  228. FontSize="{TemplateBinding FontSize}"/>
  229. <Popup x:Name="Popup" Placement="Bottom"
  230. IsOpen="{TemplateBinding IsDropDownOpen}"
  231. AllowsTransparency="True"
  232. Focusable="False"
  233. PopupAnimation="Scroll"
  234. Margin="0 10 0 0">
  235. <Grid x:Name="DropDown"
  236. SnapsToDevicePixels="False"
  237. MinWidth="{TemplateBinding ActualWidth}"
  238. MaxHeight="{TemplateBinding MaxDropDownHeight}">
  239. <Border x:Name="DropDownBorder"
  240. BorderThickness="1"
  241. BorderBrush="#43291f"
  242. Background="White"
  243. Margin="0 10 0 0">
  244. <ScrollViewer Margin="0"
  245. SnapsToDevicePixels="True"
  246. OverridesDefaultStyle="True"
  247. Foreground="#43291f"
  248. FontSize="{TemplateBinding FontSize}">
  249. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Continue" Margin="0">
  250. </StackPanel>
  251. </ScrollViewer>
  252. </Border>
  253. </Grid>
  254. </Popup>
  255. </Grid>
  256. </Border>
  257. <ControlTemplate.Triggers>
  258. <MultiTrigger>
  259. <MultiTrigger.Conditions>
  260. <Condition Property="Text" Value=""/>
  261. </MultiTrigger.Conditions>
  262. <Setter Property="Visibility" Value="Visible" TargetName="Watermark"/>
  263. </MultiTrigger>
  264. <Trigger Property="HasItems" Value="False">
  265. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
  266. </Trigger>
  267. <Trigger Property="IsGrouping" Value="True">
  268. <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
  269. </Trigger>
  270. </ControlTemplate.Triggers>
  271. </ControlTemplate>
  272. </Setter.Value>
  273. </Setter>
  274. </Style.Setters>
  275. </Style>
  276. <Style x:Key="SPHorizCent" TargetType="StackPanel">
  277. <Style.Setters>
  278. <Setter Property="Margin" Value="5"/>
  279. <Setter Property="Orientation" Value="Horizontal"/>
  280. <Setter Property="HorizontalAlignment" Value="Center"/>
  281. </Style.Setters>
  282. </Style>
  283. <Style x:Key="TBkName" TargetType="TextBlock">
  284. <Style.Setters>
  285. <Setter Property="FontWeight" Value="Bold"/>
  286. <Setter Property="FontSize" Value="18"/>
  287. <Setter Property="Foreground" Value="#43291f"/>
  288. <Setter Property="Height" Value="60"/>
  289. </Style.Setters>
  290. </Style>
  291. <Style x:Key="TBkPrice" TargetType="TextBlock">
  292. <Style.Setters>
  293. <Setter Property="FontWeight" Value="Bold"/>
  294. <Setter Property="FontSize" Value="16"/>
  295. <Setter Property="Foreground" Value="#da2c38"/>
  296. <Setter Property="Margin" Value="0 0 15 0"/>
  297. <Setter Property="HorizontalAlignment" Value="Right"/>
  298. </Style.Setters>
  299. </Style>
  300. <Style x:Key="TBkOtherText" TargetType="TextBlock">
  301. <Style.Setters>
  302. <Setter Property="FontSize" Value="14"/>
  303. <Setter Property="Foreground" Value="#43291f"/>
  304. </Style.Setters>
  305. </Style>
  306. <Style x:Key="TBkAvailability" TargetType="TextBlock">
  307. <Style.Setters>
  308. <Setter Property="Padding" Value="5"/>
  309. <Setter Property="Margin" Value="5"/>
  310. <Setter Property="Height" Value="Auto"/>
  311. <Setter Property="FontWeight" Value="Bold"/>
  312. <Setter Property="FontSize" Value="14"/>
  313. <Setter Property="Foreground" Value="White"/>
  314. <Setter Property="TextAlignment" Value="Center"/>
  315. <Setter Property="HorizontalAlignment" Value="Right"/>
  316. <Setter Property="VerticalAlignment" Value="Bottom"/>
  317. </Style.Setters>
  318. </Style>
  319. <Style x:Key="TBxParamJewelry" TargetType="TextBox">
  320. <Style.Setters>
  321. <Setter Property="FontSize" Value="14"/>
  322. <Setter Property="Foreground" Value="#43291f"/>
  323. <Setter Property="TextWrapping" Value="Wrap"/>
  324. <Setter Property="Width" Value="340"/>
  325. <Setter Property="BorderThickness" Value="0"/>
  326. <Setter Property="Padding" Value="5"/>
  327. <Setter Property="Background" Value="Transparent"/>
  328. </Style.Setters>
  329. </Style>
  330. <Style x:Key="CBJewelryAdd" TargetType="ComboBox">
  331. <Setter Property="Height" Value="35"/>
  332. <Setter Property="FontSize" Value="14"/>
  333. <Setter Property="Foreground" Value="#43291f"/>
  334. <Setter Property="Cursor" Value="Hand"/>
  335. <Setter Property="Margin" Value="0 0 0 0"/>
  336. <Setter Property="Template">
  337. <Setter.Value>
  338. <ControlTemplate TargetType="{x:Type ComboBox}">
  339. <Border CornerRadius="5" BorderBrush="#43291f" BorderThickness="1" Padding="5"
  340. Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
  341. <Grid>
  342. <ToggleButton x:Name="ToggleButton"
  343. Template="{StaticResource ComboBoxToggleButton}"
  344. Grid.Column="2"
  345. Focusable="False"
  346. ClickMode="Press"
  347. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
  348. <ContentPresenter x:Name="ContentSite"
  349. IsHitTestVisible="False"
  350. Content="{TemplateBinding SelectedItem}"
  351. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  352. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  353. Margin="11 0 25 0"
  354. VerticalAlignment="Center"
  355. HorizontalAlignment="Left"
  356. IsEnabled="True"/>
  357. <Label x:Name="Watermark"
  358. VerticalAlignment="Center"
  359. HorizontalAlignment="Left"
  360. Foreground="#b6ad90"
  361. Visibility="Collapsed"
  362. Padding="10 0 0 0"
  363. Content="{TemplateBinding Tag}"
  364. FontSize="{TemplateBinding FontSize}"/>
  365. <Popup x:Name="Popup" Placement="Bottom"
  366. IsOpen="{TemplateBinding IsDropDownOpen}"
  367. AllowsTransparency="True"
  368. Focusable="False"
  369. PopupAnimation="Scroll"
  370. Margin="5 10 0 0">
  371. <Grid x:Name="DropDown"
  372. SnapsToDevicePixels="False"
  373. MinWidth="{TemplateBinding ActualWidth}"
  374. MaxHeight="{TemplateBinding MaxDropDownHeight}">
  375. <Border x:Name="DropDownBorder"
  376. BorderThickness="1"
  377. BorderBrush="#43291f"
  378. Background="White"
  379. Margin="5 10 0 0">
  380. <ScrollViewer Margin="0"
  381. SnapsToDevicePixels="True"
  382. OverridesDefaultStyle="True"
  383. Foreground="#43291f"
  384. FontSize="{TemplateBinding FontSize}">
  385. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Continue" Margin="0">
  386. </StackPanel>
  387. </ScrollViewer>
  388. </Border>
  389. </Grid>
  390. </Popup>
  391. </Grid>
  392. </Border>
  393. <ControlTemplate.Triggers>
  394. <MultiTrigger>
  395. <MultiTrigger.Conditions>
  396. <Condition Property="Text" Value=""/>
  397. </MultiTrigger.Conditions>
  398. <Setter Property="Visibility" Value="Visible" TargetName="Watermark"/>
  399. </MultiTrigger>
  400. <Trigger Property="HasItems" Value="False">
  401. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
  402. </Trigger>
  403. <Trigger Property="IsGrouping" Value="True">
  404. <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
  405. </Trigger>
  406. </ControlTemplate.Triggers>
  407. </ControlTemplate>
  408. </Setter.Value>
  409. </Setter>
  410. </Style>
  411. <ImageBrush x:Key="ib_bin_brown" ImageSource="/Resources/ic_bin_brown.png"/>
  412. <ImageBrush x:Key="ib_bin_red" ImageSource="/Resources/ic_bin_red.png"/>
  413. <Style x:Key="BtnDeleteJewelry" TargetType="Button">
  414. <Style.Setters>
  415. <Setter Property="Width" Value="25"/>
  416. <Setter Property="Height" Value="25"/>
  417. <Setter Property="Template">
  418. <Setter.Value>
  419. <ControlTemplate TargetType="Button">
  420. <Border x:Name="border" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Padding="5"
  421. Background="{StaticResource ib_bin_brown}"/>
  422. <ControlTemplate.Triggers>
  423. <Trigger Property="IsMouseOver" Value="True">
  424. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_bin_red}"/>
  425. </Trigger>
  426. <Trigger Property="IsPressed" Value="True">
  427. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_bin_red}"/>
  428. </Trigger>
  429. </ControlTemplate.Triggers>
  430. </ControlTemplate>
  431. </Setter.Value>
  432. </Setter>
  433. </Style.Setters>
  434. </Style>
  435. <ImageBrush x:Key="ib_edit_brown" ImageSource="/Resources/ic_editing_brown.png"/>
  436. <ImageBrush x:Key="ib_edit_green" ImageSource="/Resources/ic_editing_green.png"/>
  437. <Style x:Key="BtnEditJewelry" TargetType="Button">
  438. <Style.Setters>
  439. <Setter Property="Width" Value="25"/>
  440. <Setter Property="Height" Value="25"/>
  441. <Setter Property="Template">
  442. <Setter.Value>
  443. <ControlTemplate TargetType="Button">
  444. <Border x:Name="border" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Padding="5"
  445. Background="{StaticResource ib_edit_brown}"/>
  446. <ControlTemplate.Triggers>
  447. <Trigger Property="IsMouseOver" Value="True">
  448. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_edit_green}"/>
  449. </Trigger>
  450. <Trigger Property="IsPressed" Value="True">
  451. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_edit_green}"/>
  452. </Trigger>
  453. </ControlTemplate.Triggers>
  454. </ControlTemplate>
  455. </Setter.Value>
  456. </Setter>
  457. </Style.Setters>
  458. </Style>
  459. <ImageBrush x:Key="ib_filter_no_active" ImageSource="/Resources/ic_filter_noactive.png"/>
  460. <ImageBrush x:Key="ib_filter_active" ImageSource="/Resources/ic_filter_active.png"/>
  461. <Style x:Key="BtnFilter" TargetType="Button">
  462. <Style.Setters>
  463. <Setter Property="Width" Value="25"/>
  464. <Setter Property="Height" Value="25"/>
  465. <Setter Property="Template">
  466. <Setter.Value>
  467. <ControlTemplate TargetType="Button">
  468. <Border x:Name="border" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Padding="5"
  469. Background="{StaticResource ib_filter_no_active}"/>
  470. <ControlTemplate.Triggers>
  471. <Trigger Property="IsMouseOver" Value="True">
  472. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_filter_active}"/>
  473. </Trigger>
  474. <Trigger Property="IsPressed" Value="True">
  475. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_filter_active}"/>
  476. </Trigger>
  477. </ControlTemplate.Triggers>
  478. </ControlTemplate>
  479. </Setter.Value>
  480. </Setter>
  481. </Style.Setters>
  482. </Style>
  483. <ImageBrush x:Key="ib_search_brown" ImageSource="/Resources/ic_search_brown.png"/>
  484. <ImageBrush x:Key="ib_search_green" ImageSource="/Resources/ic_search_green.png"/>
  485. <Style x:Key="tbox_Search" TargetType="{x:Type TextBox}">
  486. <Setter Property="FontSize" Value="15"/>
  487. <Setter Property="Height" Value="Auto"/>
  488. <Setter Property="Width" Value="Auto"/>
  489. <Setter Property="Background" Value="white"/>
  490. <Setter Property="Foreground" Value="#43291f"/>
  491. <Setter Property="Padding" Value="0 5 5 4"/>
  492. <Setter Property="Margin" Value="0 10 0 0"/>
  493. <Setter Property="Grid.Column" Value="1"/>
  494. <Setter Property="VerticalContentAlignment" Value="Center"/>
  495. <Setter Property="Cursor" Value="IBeam"/>
  496. <Setter Property="HorizontalAlignment" Value="Center"/>
  497. <Setter Property="VerticalAlignment" Value="Center"/>
  498. <Setter Property="Template">
  499. <Setter.Value>
  500. <ControlTemplate TargetType="{x:Type TextBox}">
  501. <Border x:Name="TxtBorder"
  502. BorderBrush="#43291f"
  503. BorderThickness="1"
  504. CornerRadius="5"
  505. SnapsToDevicePixels="True">
  506. <Grid Margin="{TemplateBinding Padding}">
  507. <Grid.ColumnDefinitions>
  508. <ColumnDefinition Width="30"/>
  509. <ColumnDefinition Width="*"/>
  510. </Grid.ColumnDefinitions>
  511. <ScrollViewer x:Name="PART_ContentHost"
  512. Focusable="False"
  513. Grid.Column="1"
  514. Margin="5 0 0 0"
  515. HorizontalScrollBarVisibility="Hidden"
  516. VerticalScrollBarVisibility="Hidden"/>
  517. <Border x:Name="ic"
  518. Background="{StaticResource ib_search_brown}"
  519. BorderThickness="0"
  520. Height="25"
  521. Width="25"
  522. Margin="5 0 0 3"
  523. HorizontalAlignment="Center"
  524. VerticalAlignment="Center"
  525. ToolTip="Name"
  526. Cursor="Arrow"
  527. Grid.Column="0"/>
  528. <Label x:Name="Watermark"
  529. FontSize="15"
  530. VerticalAlignment="Center"
  531. HorizontalAlignment="Left"
  532. Foreground="#43291f"
  533. Visibility="Collapsed"
  534. Padding="5 0 20 0"
  535. Content="{TemplateBinding Tag}"
  536. Grid.Column="1"/>
  537. </Grid>
  538. </Border>
  539. <ControlTemplate.Triggers>
  540. <Trigger Property="IsMouseOver" Value="True">
  541. <Setter Property="BorderBrush" Value="#226f54" TargetName="TxtBorder"/>
  542. <Setter Property="Control.Foreground" Value="#226f54"/>
  543. <Setter Property="Foreground" TargetName="Watermark" Value="#226f54"/>
  544. <Setter Property="Background" TargetName="ic" Value="{StaticResource ib_search_green}"/>
  545. </Trigger>
  546. <Trigger Property="IsKeyboardFocused" Value="True">
  547. <Setter Property="Control.Foreground" Value="#226f54"/>
  548. <Setter Property="BorderBrush" Value="#226f54" TargetName="TxtBorder"/>
  549. <Setter Property="BorderThickness" Value="1 1 1 3" TargetName="TxtBorder"/>
  550. <Setter Property="Foreground" TargetName="Watermark" Value="#226f54"/>
  551. <Setter Property="Background" TargetName="ic" Value="{StaticResource ib_search_green}"/>
  552. </Trigger>
  553. <MultiTrigger>
  554. <MultiTrigger.Conditions>
  555. <Condition Property="Text" Value=""/>
  556. </MultiTrigger.Conditions>
  557. <Setter Property="Visibility" Value="Visible" TargetName="Watermark"/>
  558. </MultiTrigger>
  559. </ControlTemplate.Triggers>
  560. </ControlTemplate>
  561. </Setter.Value>
  562. </Setter>
  563. </Style>
  564. <ImageBrush x:Key="ib_arrow_grey_right" ImageSource="/Resources/ic_arrow_grey_right.png"/>
  565. <ImageBrush x:Key="ib_arrow_green_right" ImageSource="/Resources/ic_arrow_green_right.png"/>
  566. <ImageBrush x:Key="ib_arrow_grey_left" ImageSource="/Resources/ic_arrow_grey_left.png"/>
  567. <ImageBrush x:Key="ib_arrow_green_left" ImageSource="/Resources/ic_arrow_green_left.png"/>
  568. <Style x:Key="BtnArrowRight" TargetType="Button">
  569. <Style.Setters>
  570. <Setter Property="Width" Value="25"/>
  571. <Setter Property="Height" Value="25"/>
  572. <Setter Property="Cursor" Value="Hand"/>
  573. <Setter Property="Template">
  574. <Setter.Value>
  575. <ControlTemplate TargetType="Button">
  576. <Border x:Name="border" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Padding="5"
  577. Background="{StaticResource ib_arrow_grey_right}"/>
  578. <ControlTemplate.Triggers>
  579. <Trigger Property="IsMouseOver" Value="True">
  580. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_arrow_green_right}"/>
  581. </Trigger>
  582. <Trigger Property="IsPressed" Value="True">
  583. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_arrow_green_right}"/>
  584. </Trigger>
  585. </ControlTemplate.Triggers>
  586. </ControlTemplate>
  587. </Setter.Value>
  588. </Setter>
  589. </Style.Setters>
  590. </Style>
  591. <Style x:Key="BtnArrowLeft" TargetType="Button">
  592. <Style.Setters>
  593. <Setter Property="Width" Value="25"/>
  594. <Setter Property="Height" Value="25"/>
  595. <Setter Property="Cursor" Value="Hand"/>
  596. <Setter Property="Template">
  597. <Setter.Value>
  598. <ControlTemplate TargetType="Button">
  599. <Border x:Name="border" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Padding="5"
  600. Background="{StaticResource ib_arrow_grey_left}"/>
  601. <ControlTemplate.Triggers>
  602. <Trigger Property="IsMouseOver" Value="True">
  603. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_arrow_green_left}"/>
  604. </Trigger>
  605. <Trigger Property="IsPressed" Value="True">
  606. <Setter Property="Background" TargetName="border" Value="{StaticResource ib_arrow_green_left}"/>
  607. </Trigger>
  608. </ControlTemplate.Triggers>
  609. </ControlTemplate>
  610. </Setter.Value>
  611. </Setter>
  612. </Style.Setters>
  613. </Style>
  614. </Application.Resources>
  615. </Application>