App.xaml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. <Application x:Class="school.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:school"
  5. StartupUri="FolderWindows/MainWindow.xaml">
  6. <Application.Resources>
  7. <Color x:Key="_mainColorFon" A="255" R="255" G="255" B="255"></Color>
  8. <Color x:Key="_additionalColorFon" A="255" R="231" G="250" B="191"></Color>
  9. <Color x:Key="_attentionColor" A="255" R="4" G="180" B="255"></Color>
  10. <SolidColorBrush x:Key="mainColorFon" Color="{StaticResource _mainColorFon}"></SolidColorBrush>
  11. <SolidColorBrush x:Key="additionalColorFon" Color="{StaticResource _additionalColorFon}"></SolidColorBrush>
  12. <SolidColorBrush x:Key="attentionColor" Color="{StaticResource _attentionColor}"></SolidColorBrush>
  13. <Image x:Key="imgNoPhoto" Source="Resource\noPhoto.png"/>
  14. <Style TargetType="TextBlock">
  15. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  16. </Style>
  17. <Style x:Key="usuallyTextBlock" TargetType="TextBlock">
  18. <Style.Setters>
  19. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  20. <Setter Property="Foreground" Value="LightSlateGray"/>
  21. <Setter Property="Margin" Value="0 5"/>
  22. </Style.Setters>
  23. </Style>
  24. <Style x:Key="usuallyTextBlockHeader" TargetType="TextBlock">
  25. <Style.Setters>
  26. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  27. <Setter Property="FontWeight" Value="Bold"/>
  28. <Setter Property="Foreground" Value="{StaticResource attentionColor}"/>
  29. <Setter Property="Margin" Value="0 5"/>
  30. </Style.Setters>
  31. </Style>
  32. <Style x:Key="usuallyButton" TargetType="Button">
  33. <Style.Setters>
  34. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  35. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  36. <Setter Property="VerticalContentAlignment" Value="Center"/>
  37. <Setter Property="MinWidth" Value="150"/>
  38. <Setter Property="MinHeight" Value="25"/>
  39. <Setter Property="FontSize" Value="14"/>
  40. <Setter Property="Foreground" Value="LightSlateGray"/>
  41. <Setter Property="BorderBrush" Value="LightSlateGray"/>
  42. <Setter Property="Margin" Value="0 5"/>
  43. <Setter Property="Padding" Value="10 5"/>
  44. <Setter Property="Cursor" Value="Hand"/>
  45. <Setter Property="Template">
  46. <Setter.Value>
  47. <ControlTemplate TargetType="Button">
  48. <Border Background="White" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="2" CornerRadius="5">
  49. <ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" TextBlock.FontStretch="{TemplateBinding FontStretch}"/>
  50. </Border>
  51. </ControlTemplate>
  52. </Setter.Value>
  53. </Setter>
  54. </Style.Setters>
  55. <Style.Triggers>
  56. <Trigger Property="IsMouseOver" Value="True">
  57. <Setter Property="BorderBrush" Value="{StaticResource attentionColor}"/>
  58. <Setter Property="Foreground" Value="{StaticResource attentionColor}"/>
  59. </Trigger>
  60. </Style.Triggers>
  61. </Style>
  62. <Style x:Key="usuallyButtonFill" TargetType="Button">
  63. <Style.Setters>
  64. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  65. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  66. <Setter Property="VerticalContentAlignment" Value="Center"/>
  67. <Setter Property="MinWidth" Value="150"/>
  68. <Setter Property="MinHeight" Value="25"/>
  69. <Setter Property="FontSize" Value="14"/>
  70. <Setter Property="Foreground" Value="White"/>
  71. <Setter Property="Background" Value="{StaticResource attentionColor}"/>
  72. <Setter Property="BorderBrush" Value="{StaticResource attentionColor}"/>
  73. <Setter Property="Cursor" Value="Hand"/>
  74. <Setter Property="Template">
  75. <Setter.Value>
  76. <ControlTemplate TargetType="Button">
  77. <Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="5">
  78. <ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  79. </Border>
  80. </ControlTemplate>
  81. </Setter.Value>
  82. </Setter>
  83. </Style.Setters>
  84. <Style.Triggers>
  85. <Trigger Property="IsMouseOver" Value="True">
  86. <Setter Property="Background" Value="LightGray"/>
  87. <Setter Property="Foreground" Value="{StaticResource attentionColor}"/>
  88. </Trigger>
  89. </Style.Triggers>
  90. </Style>
  91. <Style x:Key="usuallyButtonNoFill" TargetType="Button">
  92. <Style.Setters>
  93. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  94. <Setter Property="Foreground" Value="LightSlateGray"/>
  95. <Setter Property="FontSize" Value="14"/>
  96. <Setter Property="Background" Value="Transparent"/>
  97. <Setter Property="Padding" Value="5 2"/>
  98. <Setter Property="Margin" Value="0"/>
  99. <Setter Property="Template">
  100. <Setter.Value>
  101. <ControlTemplate TargetType="Button">
  102. <Border Background="{TemplateBinding Background}" BorderThickness="0">
  103. <ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  104. </Border>
  105. </ControlTemplate>
  106. </Setter.Value>
  107. </Setter>
  108. </Style.Setters>
  109. <Style.Triggers>
  110. <Trigger Property="IsMouseOver" Value="True">
  111. <Setter Property="Foreground" Value="{StaticResource attentionColor}"/>
  112. </Trigger>
  113. </Style.Triggers>
  114. </Style>
  115. <Style x:Key="usuallyPasswordBox" TargetType="PasswordBox">
  116. <Setter Property="FontSize" Value="14"/>
  117. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  118. <Setter Property="Height" Value="Auto"/>
  119. <Setter Property="Width" Value="Auto"/>
  120. <Setter Property="Background" Value="white"/>
  121. <Setter Property="Foreground" Value="LightSlateGray"/>
  122. <Setter Property="Padding" Value="0 5 5 4"/>
  123. <Setter Property="Grid.Column" Value="1"/>
  124. <Setter Property="VerticalContentAlignment" Value="Center"/>
  125. <Setter Property="Cursor" Value="IBeam"/>
  126. <Setter Property="HorizontalAlignment" Value="Center"/>
  127. <Setter Property="VerticalAlignment" Value="Center"/>
  128. <Setter Property="Template">
  129. <Setter.Value>
  130. <ControlTemplate TargetType="{x:Type PasswordBox}">
  131. <Border x:Name="TxtBorder"
  132. BorderBrush="LightSlateGray"
  133. BorderThickness="1"
  134. CornerRadius="5"
  135. SnapsToDevicePixels="True">
  136. <Grid Margin="{TemplateBinding Padding}">
  137. <Grid.ColumnDefinitions>
  138. <ColumnDefinition Width="*"/>
  139. </Grid.ColumnDefinitions>
  140. <ScrollViewer x:Name="PART_ContentHost"
  141. Focusable="False"
  142. Grid.Column="1"
  143. Margin="5 0 0 0"
  144. HorizontalScrollBarVisibility="Hidden"
  145. VerticalScrollBarVisibility="Hidden"/>
  146. <Label x:Name="Watermark"
  147. VerticalAlignment="Center"
  148. HorizontalAlignment="Left"
  149. Foreground="LightSlateGray"
  150. Visibility="Collapsed"
  151. Padding="9 0 20 0"
  152. Content="{TemplateBinding Tag}"
  153. Grid.Column="1"/>
  154. </Grid>
  155. </Border>
  156. <ControlTemplate.Triggers>
  157. <Trigger Property="IsKeyboardFocused" Value="False">
  158. <Setter Property="Visibility" Value="Visible" TargetName="Watermark"/>
  159. </Trigger>
  160. <Trigger Property="IsMouseOver" Value="True">
  161. <Setter Property="Control.Foreground" Value="{StaticResource attentionColor}"/>
  162. <Setter Property="Foreground" TargetName="Watermark" Value="{StaticResource attentionColor}"/>
  163. </Trigger>
  164. <Trigger Property="IsKeyboardFocused" Value="True">
  165. <Setter Property="Control.Foreground" Value="{StaticResource attentionColor}"/>
  166. <Setter Property="Foreground" TargetName="Watermark" Value="#0E498B"/>
  167. <Setter Property="Visibility" Value="Collapsed" TargetName="Watermark"/>
  168. </Trigger>
  169. </ControlTemplate.Triggers>
  170. </ControlTemplate>
  171. </Setter.Value>
  172. </Setter>
  173. </Style>
  174. <Style x:Key="usuallyGroupBox" TargetType="GroupBox">
  175. <Style.Setters>
  176. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  177. <Setter Property="FontWeight" Value="Bold"/>
  178. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  179. <Setter Property="VerticalContentAlignment" Value="Center"/>
  180. <Setter Property="FontSize" Value="15"/>
  181. <Setter Property="Foreground" Value="{StaticResource attentionColor}"/>
  182. <Setter Property="BorderBrush" Value="Transparent"/>
  183. <Setter Property="Padding" Value="5"/>
  184. <Setter Property="Margin" Value="0 2.5"/>
  185. </Style.Setters>
  186. </Style>
  187. <Style x:Key="usuallyRadioButton" TargetType="RadioButton">
  188. <Style.Setters>
  189. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  190. <Setter Property="FontSize" Value="14"/>
  191. <Setter Property="Foreground" Value="LightSlateGray"/>
  192. <Setter Property="Cursor" Value="Hand"/>
  193. <Setter Property="Margin" Value="0 1.5"/>
  194. </Style.Setters>
  195. </Style>
  196. <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
  197. <Grid>
  198. <Grid.ColumnDefinitions>
  199. <ColumnDefinition/>
  200. <ColumnDefinition Width="25"/>
  201. </Grid.ColumnDefinitions>
  202. <Border Grid.ColumnSpan="2" SnapsToDevicePixels="true">
  203. </Border>
  204. <Border Grid.Column="1">
  205. <Path x:Name="Arrow"
  206. 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"
  207. Fill="LightSlateGray"
  208. Stretch="Fill"
  209. Height="7"
  210. Width="10"
  211. HorizontalAlignment="Center"
  212. VerticalAlignment="Center"/>
  213. </Border>
  214. </Grid>
  215. </ControlTemplate>
  216. <Style x:Key="usuallyComboBox" TargetType="ComboBox">
  217. <Setter Property="Height" Value="30"/>
  218. <Setter Property="FontSize" Value="14"/>
  219. <Setter Property="Foreground" Value="LightSlateGray"/>
  220. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  221. <Setter Property="FontWeight" Value="Regular"/>
  222. <Setter Property="Cursor" Value="Hand"/>
  223. <Setter Property="Margin" Value="0 0 0 0"/>
  224. <Setter Property="Template">
  225. <Setter.Value>
  226. <ControlTemplate TargetType="{x:Type ComboBox}">
  227. <Border CornerRadius="5" BorderBrush="{StaticResource attentionColor}" BorderThickness="1" Padding="5"
  228. Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
  229. <Grid>
  230. <ToggleButton x:Name="ToggleButton"
  231. Template="{StaticResource ComboBoxToggleButton}"
  232. Grid.Column="2"
  233. Focusable="False"
  234. ClickMode="Press"
  235. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
  236. <ContentPresenter x:Name="ContentSite"
  237. IsHitTestVisible="False"
  238. Content="{TemplateBinding SelectedItem}"
  239. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  240. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  241. Margin="11 0 25 0"
  242. VerticalAlignment="Center"
  243. HorizontalAlignment="Left"
  244. IsEnabled="True"/>
  245. <Label x:Name="Watermark"
  246. VerticalAlignment="Center"
  247. HorizontalAlignment="Left"
  248. Foreground="{TemplateBinding Foreground}"
  249. Visibility="Collapsed"
  250. Padding="10 0 0 0"
  251. Content="{TemplateBinding Tag}"
  252. FontSize="{TemplateBinding FontSize}"/>
  253. <Popup x:Name="Popup" Placement="Bottom"
  254. IsOpen="{TemplateBinding IsDropDownOpen}"
  255. AllowsTransparency="True"
  256. Focusable="False"
  257. PopupAnimation="Scroll"
  258. Margin="5 10 0 0">
  259. <Grid x:Name="DropDown"
  260. SnapsToDevicePixels="False"
  261. MinWidth="{TemplateBinding ActualWidth}"
  262. MaxHeight="{TemplateBinding MaxDropDownHeight}">
  263. <Border x:Name="DropDownBorder"
  264. BorderThickness="1"
  265. BorderBrush="LightSlateGray"
  266. Background="White"
  267. Margin="5 10 0 0">
  268. <ScrollViewer Margin="0"
  269. SnapsToDevicePixels="True"
  270. OverridesDefaultStyle="True"
  271. Foreground="{TemplateBinding Foreground}"
  272. FontWeight="Regular"
  273. FontSize="{TemplateBinding FontSize}">
  274. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Continue" Margin="0">
  275. </StackPanel>
  276. </ScrollViewer>
  277. </Border>
  278. </Grid>
  279. </Popup>
  280. </Grid>
  281. </Border>
  282. <ControlTemplate.Triggers>
  283. <MultiTrigger>
  284. <MultiTrigger.Conditions>
  285. <Condition Property="Text" Value=""/>
  286. </MultiTrigger.Conditions>
  287. <Setter Property="Visibility" Value="Visible" TargetName="Watermark"/>
  288. </MultiTrigger>
  289. <Trigger Property="HasItems" Value="False">
  290. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
  291. </Trigger>
  292. <Trigger Property="IsGrouping" Value="True">
  293. <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
  294. </Trigger>
  295. </ControlTemplate.Triggers>
  296. </ControlTemplate>
  297. </Setter.Value>
  298. </Setter>
  299. </Style>
  300. <ImageBrush x:Key="ib_search_grey" ImageSource="/Resource/ic_search_grey.png"/>
  301. <ImageBrush x:Key="ib_search_blue" ImageSource="/Resource/ic_search_blue.png"/>
  302. <Style x:Key="usuallyTextBloxSearch" TargetType="TextBox">
  303. <Style.Setters>
  304. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  305. <Setter Property="FontWeight" Value="Regular"/>
  306. <Setter Property="FontSize" Value="14"/>
  307. <Setter Property="Height" Value="35"/>
  308. <Setter Property="Width" Value="235"/>
  309. <Setter Property="Background" Value="white"/>
  310. <Setter Property="Foreground" Value="{StaticResource attentionColor}"/>
  311. <Setter Property="Grid.Column" Value="1"/>
  312. <Setter Property="VerticalContentAlignment" Value="Center"/>
  313. <Setter Property="Cursor" Value="IBeam"/>
  314. <Setter Property="HorizontalAlignment" Value="Center"/>
  315. <Setter Property="VerticalAlignment" Value="Center"/>
  316. <Setter Property="Template">
  317. <Setter.Value>
  318. <ControlTemplate TargetType="{x:Type TextBox}">
  319. <Border x:Name="TxtBorder"
  320. BorderBrush="{StaticResource attentionColor}"
  321. BorderThickness="1"
  322. CornerRadius="5"
  323. SnapsToDevicePixels="True">
  324. <Grid Margin="{TemplateBinding Padding}">
  325. <Grid.ColumnDefinitions>
  326. <ColumnDefinition Width="25"/>
  327. <ColumnDefinition Width="*"/>
  328. </Grid.ColumnDefinitions>
  329. <ScrollViewer x:Name="PART_ContentHost"
  330. Focusable="False"
  331. Grid.Column="1"
  332. Margin="5 0 0 0"
  333. HorizontalScrollBarVisibility="Hidden"
  334. VerticalScrollBarVisibility="Hidden"/>
  335. <Border x:Name="ic"
  336. Background="{StaticResource ib_search_grey}"
  337. BorderThickness="0"
  338. Height="15"
  339. Width="15"
  340. Margin="5 0 0 3"
  341. HorizontalAlignment="Center"
  342. VerticalAlignment="Center"
  343. ToolTip="Name"
  344. Cursor="Arrow"
  345. Grid.Column="0"/>
  346. <Label x:Name="Watermark"
  347. FontSize="15"
  348. VerticalAlignment="Center"
  349. HorizontalAlignment="Left"
  350. Foreground="LightSlateGray"
  351. Visibility="Collapsed"
  352. Padding="5 0 20 0"
  353. Content="{TemplateBinding Tag}"
  354. Grid.Column="1"/>
  355. </Grid>
  356. </Border>
  357. <ControlTemplate.Triggers>
  358. <MultiTrigger>
  359. <MultiTrigger.Conditions>
  360. <Condition Property="Text" Value=""/>
  361. </MultiTrigger.Conditions>
  362. <Setter Property="Visibility" Value="Visible" TargetName="Watermark"/>
  363. </MultiTrigger>
  364. </ControlTemplate.Triggers>
  365. </ControlTemplate>
  366. </Setter.Value>
  367. </Setter>
  368. </Style.Setters>
  369. </Style>
  370. <Style x:Key="usuallyTextBlox" TargetType="TextBox">
  371. <Style.Setters>
  372. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  373. <Setter Property="FontWeight" Value="Regular"/>
  374. <Setter Property="FontSize" Value="14"/>
  375. <Setter Property="MinHeight" Value="50"/>
  376. <Setter Property="Width" Value="300"/>
  377. <Setter Property="TextWrapping" Value="Wrap"/>
  378. <Setter Property="Background" Value="white"/>
  379. <Setter Property="Foreground" Value="{StaticResource attentionColor}"/>
  380. <Setter Property="Grid.Column" Value="1"/>
  381. <Setter Property="VerticalContentAlignment" Value="Top"/>
  382. <Setter Property="Cursor" Value="IBeam"/>
  383. <Setter Property="HorizontalAlignment" Value="Left"/>
  384. <Setter Property="VerticalAlignment" Value="Top"/>
  385. <Setter Property="VerticalContentAlignment" Value="Top"/>
  386. <Setter Property="Template">
  387. <Setter.Value>
  388. <ControlTemplate TargetType="{x:Type TextBox}">
  389. <Border x:Name="TxtBorder"
  390. BorderBrush="LightSlateGray"
  391. BorderThickness="1"
  392. CornerRadius="5"
  393. SnapsToDevicePixels="True" Height="{TemplateBinding Height}">
  394. <Grid Margin="{TemplateBinding Padding}">
  395. <ScrollViewer x:Name="PART_ContentHost"
  396. Focusable="False"
  397. Margin="5 0 0 0"
  398. HorizontalScrollBarVisibility="Hidden"
  399. VerticalScrollBarVisibility="Auto" />
  400. <Label x:Name="Watermark"
  401. FontSize="14"
  402. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  403. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  404. Foreground="LightSlateGray"
  405. Visibility="Collapsed"
  406. Padding="5 0 20 0"
  407. Content="{TemplateBinding Tag}"
  408. Grid.Column="1"/>
  409. </Grid>
  410. </Border>
  411. <ControlTemplate.Triggers>
  412. <MultiTrigger>
  413. <MultiTrigger.Conditions>
  414. <Condition Property="Text" Value=""/>
  415. </MultiTrigger.Conditions>
  416. <Setter Property="Visibility" Value="Visible" TargetName="Watermark"/>
  417. </MultiTrigger>
  418. </ControlTemplate.Triggers>
  419. </ControlTemplate>
  420. </Setter.Value>
  421. </Setter>
  422. </Style.Setters>
  423. </Style>
  424. <Style TargetType="DatePicker">
  425. <Style.Setters>
  426. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  427. <Setter Property="FontWeight" Value="Regular"/>
  428. <Setter Property="FontSize" Value="14"/>
  429. <Setter Property="BorderBrush" Value="LightSlateGray"/>
  430. </Style.Setters>
  431. </Style>
  432. </Application.Resources>
  433. </Application>