App.xaml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <Application x:Class="Sessioa.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:Sessioa"
  5. StartupUri="MainWindow.xaml">
  6. <Application.Resources>
  7. <Style x:Key="TextBox" TargetType="{x:Type TextBox}">
  8. <Setter Property="Background" Value="#f8f8ff"/>
  9. <Setter Property="Foreground" Value="Black"/>
  10. <Setter Property="VerticalContentAlignment" Value="Center"/>
  11. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  12. <Setter Property="FontSize" Value="16"/>
  13. <Setter Property="BorderThickness" Value="1"/>
  14. <Setter Property="BorderBrush" Value="#498C51"/>
  15. <Setter Property="SelectionOpacity" Value="1"/>
  16. <Setter Property="Cursor" Value="IBeam"/>
  17. <Setter Property="Template">
  18. <Setter.Value>
  19. <ControlTemplate TargetType="{x:Type TextBox}">
  20. <Grid>
  21. <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" SnapsToDevicePixels="True">
  22. <Grid>
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition Width="11"/>
  25. <ColumnDefinition/>
  26. <ColumnDefinition Width="11"/>
  27. </Grid.ColumnDefinitions>
  28. <ScrollViewer x:Name="PART_ContentHost" Grid.Column="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" Focusable="False"/>
  29. <TextBlock x:Name="Text" Foreground="#696969" Grid.Column="1" VerticalAlignment="Center" FontFamily="Comic Sans MS" FontSize="16" Text="{TemplateBinding DataContext}"/>
  30. </Grid>
  31. </Border>
  32. </Grid>
  33. <ControlTemplate.Triggers>
  34. <Trigger Property="IsMouseOver" Value="True">
  35. <Setter Property="Background" TargetName="Border" Value="#f8f8ff"/>
  36. <Setter Property="BorderBrush" TargetName="Border" Value="#498C51"/>
  37. </Trigger>
  38. <Trigger Property="IsKeyboardFocused" Value="True">
  39. <Setter Property="Visibility" TargetName="Text" Value="Collapsed"/>
  40. <Setter Property="Background" TargetName="Border" Value="#f8f8ff"/>
  41. <Setter Property="BorderBrush" TargetName="Border" Value="#498C51"/>
  42. </Trigger>
  43. <Trigger Property="IsKeyboardFocused" Value="False">
  44. <Setter Property="Visibility" TargetName="Text" Value="Collapsed"/>
  45. </Trigger>
  46. <MultiTrigger>
  47. <MultiTrigger.Conditions>
  48. <Condition Property="Text" Value=""/>
  49. <Condition Property="IsKeyboardFocused" Value="True"/>
  50. </MultiTrigger.Conditions>
  51. <Setter Property="Visibility" TargetName="Text" Value="Collapsed"/>
  52. </MultiTrigger>
  53. <MultiTrigger>
  54. <MultiTrigger.Conditions>
  55. <Condition Property="Text" Value=""/>
  56. <Condition Property="IsKeyboardFocused" Value="False"/>
  57. </MultiTrigger.Conditions>
  58. <Setter Property="Visibility" TargetName="Text" Value="Visible"/>
  59. </MultiTrigger>
  60. </ControlTemplate.Triggers>
  61. </ControlTemplate>
  62. </Setter.Value>
  63. </Setter>
  64. </Style>
  65. <Style x:Key="ButtonSt" TargetType="{x:Type Button}">
  66. <Setter Property="Background" Value="#76E383"/>
  67. <Setter Property="BorderBrush" Value="#498C51"/>
  68. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  69. <Setter Property="FontSize" Value="16"/>
  70. <Setter Property="Template">
  71. <Setter.Value>
  72. <ControlTemplate TargetType="{x:Type Button}">
  73. <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="5" Padding="5">
  74. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  75. </Border>
  76. <ControlTemplate.Triggers>
  77. <Trigger Property="IsPressed" Value="True">
  78. <Setter Property="Background" Value="#498C51"/>
  79. </Trigger>
  80. <Trigger Property="IsMouseOver" Value="True">
  81. <Setter Property="Background" Value="#00b34a"/>
  82. </Trigger>
  83. </ControlTemplate.Triggers>
  84. </ControlTemplate>
  85. </Setter.Value>
  86. </Setter>
  87. </Style>
  88. <Style x:Key="ButtonAct" TargetType="{x:Type Button}">
  89. <Setter Property="Background" Value="#498C51"/>
  90. <Setter Property="BorderBrush" Value="#00b34a"/>
  91. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  92. <Setter Property="FontSize" Value="16"/>
  93. <Setter Property="Template">
  94. <Setter.Value>
  95. <ControlTemplate TargetType="{x:Type Button}">
  96. <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="5" Padding="5">
  97. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  98. </Border>
  99. <ControlTemplate.Triggers>
  100. <Trigger Property="IsMouseOver" Value="True">
  101. <Setter Property="Background" Value="#00b34a"/>
  102. </Trigger>
  103. <Trigger Property="IsPressed" Value="True">
  104. <Setter Property="Background" Value="#76E383"/>
  105. </Trigger>
  106. </ControlTemplate.Triggers>
  107. </ControlTemplate>
  108. </Setter.Value>
  109. </Setter>
  110. </Style>
  111. <Style x:Key="TextBlockMain" TargetType="{x:Type TextBlock}">
  112. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  113. <Setter Property="FontSize" Value="20"/>
  114. <Setter Property="FontWeight" Value="Bold"/>
  115. <Setter Property="HorizontalAlignment" Value="Center"/>
  116. </Style>
  117. <Style x:Key="TextBlockBold" TargetType="{x:Type TextBlock}">
  118. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  119. <Setter Property="FontSize" Value="16"/>
  120. <Setter Property="FontWeight" Value="Bold"/>
  121. </Style>
  122. <Style x:Key="TextBlock" TargetType="{x:Type TextBlock}">
  123. <Setter Property="FontFamily" Value="Comic Sans MS"/>
  124. <Setter Property="FontSize" Value="16"/>
  125. <Setter Property="FontWeight" Value="Light"/>
  126. </Style>
  127. </Application.Resources>
  128. </Application>