Label.xaml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  4. <!-- Label Style -->
  5. <SolidColorBrush x:Key="Label_BD" Color="#FF1B1B1B"/>
  6. <SolidColorBrush x:Key="Label_BG" Color="Transparent"/>
  7. <SolidColorBrush x:Key="TitleLabel_BD" Color="White"/>
  8. <SolidColorBrush x:Key="TitleLabel_GreenTitle_BD" Color="White"/>
  9. <Style x:Key="LableToTextBox" TargetType="{x:Type Label}">
  10. <Setter Property="BorderBrush" Value="Black"/>
  11. <Setter Property="BorderThickness" Value="1"/>
  12. <Setter Property="Padding" Value="5"/>
  13. <Setter Property="Background" Value="White"/>
  14. <Setter Property="VerticalContentAlignment" Value="Center"/>
  15. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  16. </Style>
  17. <Style TargetType="{x:Type Label}">
  18. <Setter Property="SnapsToDevicePixels" Value="True"/>
  19. <Setter Property="FontFamily" Value="Segoe" />
  20. <Setter Property="FontSize" Value="15" />
  21. <Setter Property="MinHeight" Value="20" />
  22. <Setter Property="Background" Value="{DynamicResource Label_BG}" />
  23. <Setter Property="Foreground" Value="{DynamicResource Label_BD}" />
  24. <Setter Property="AllowDrop" Value="true"/>
  25. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  26. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  27. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  28. </Style>
  29. <Style x:Key="Label_Title" TargetType="{x:Type Label}">
  30. <Setter Property="FontSize" Value="20" />
  31. <Setter Property="FontFamily" Value="Segoe" />
  32. <Setter Property="Margin" Value="0"/>
  33. <Setter Property="VerticalContentAlignment" Value="Center"/>
  34. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  35. <Setter Property="Background" Value="#ff68d2c0" />
  36. <Setter Property="Foreground" Value="Black" />
  37. </Style>
  38. <Style x:Key="Label_SubTitle" TargetType="{x:Type Label}">
  39. <Setter Property="FontSize" Value="20" />
  40. <Setter Property="FontFamily" Value="Segoe" />
  41. <Setter Property="Margin" Value="0,2,2,2"/>
  42. <Setter Property="Background" Value="#ff68d2c0" />
  43. <Setter Property="Foreground" Value="White" />
  44. </Style>
  45. <Style x:Key="LabelGrid_Title" TargetType="{x:Type Label}">
  46. <Setter Property="FontSize" Value="14" />
  47. <Setter Property="FontFamily" Value="Segoe" />
  48. <Setter Property="HorizontalContentAlignment" Value="Center" />
  49. <Setter Property="VerticalContentAlignment" Value="Center"/>
  50. <Setter Property="BorderThickness" Value="1,1,0,0" />
  51. <Setter Property="Background" Value="#FFCEECEE" />
  52. <Setter Property="Foreground" Value="Black" />
  53. <Setter Property="BorderBrush" Value="Gray"/>
  54. <Setter Property="Padding" Value="5,0,0,0" />
  55. <Setter Property="Template">
  56. <Setter.Value>
  57. <ControlTemplate TargetType="{x:Type Label}">
  58. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
  59. <TextBlock Text="{TemplateBinding Content}" FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
  60. </TextBlock>
  61. </Border>
  62. </ControlTemplate>
  63. </Setter.Value>
  64. </Setter>
  65. </Style>
  66. <Style x:Key="LabelContent_Title" TargetType="{x:Type Label}">
  67. <Setter Property="FontSize" Value="14" />
  68. <Setter Property="FontFamily" Value="Segoe" />
  69. <Setter Property="HorizontalContentAlignment" Value="Left" />
  70. <Setter Property="VerticalContentAlignment" Value="Center"/>
  71. <Setter Property="Margin" Value="0"/>
  72. <Setter Property="BorderThickness" Value="1,1,0,0" />
  73. <Setter Property="Background" Value="White" />
  74. <Setter Property="Foreground" Value="Black" />
  75. <Setter Property="BorderBrush" Value="Gray"/>
  76. <Setter Property="Padding" Value="5,0,0,0" />
  77. <Setter Property="Template">
  78. <Setter.Value>
  79. <ControlTemplate TargetType="{x:Type Label}">
  80. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
  81. <TextBlock Text="{TemplateBinding Content}" FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
  82. </TextBlock>
  83. </Border>
  84. </ControlTemplate>
  85. </Setter.Value>
  86. </Setter>
  87. </Style>
  88. <Style x:Key="Label_GreenTitle" TargetType="{x:Type Label}">
  89. <Setter Property="FontSize" Value="20" />
  90. <Setter Property="FontFamily" Value="Segoe" />
  91. <Setter Property="Margin" Value="0,2,2,2"/>
  92. <Setter Property="Background" Value="#ff00998a" />
  93. <Setter Property="Foreground" Value="White" />
  94. </Style>
  95. <Style x:Key="Label_GreenSmallTitle" TargetType="{x:Type Label}">
  96. <Setter Property="FontSize" Value="16" />
  97. <Setter Property="FontFamily" Value="Segoe" />
  98. <Setter Property="Margin" Value="0,2,2,2"/>
  99. <Setter Property="Background" Value="#ff00998a" />
  100. <Setter Property="Foreground" Value="White" />
  101. </Style>
  102. <Style x:Key="Label_GridButton" TargetType="{x:Type Label}">
  103. <Setter Property="SnapsToDevicePixels" Value="True"/>
  104. <Setter Property="FontSize" Value="16" />
  105. <Setter Property="FontFamily" Value="Segoe" />
  106. <Setter Property="Margin" Value="0,2,2,2"/>
  107. <Setter Property="Background" Value="{DynamicResource Label_BG}" />
  108. <Setter Property="Foreground" Value="{DynamicResource Label_BD}" />
  109. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  110. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  111. </Style>
  112. <!-- Label_Top Style -->
  113. <SolidColorBrush x:Key="Label_Top_BG" Color="#FFC8E8FF"/>
  114. <SolidColorBrush x:Key="Label_Top_Shadow" Color="#FF1B1B1B"/>
  115. <SolidColorBrush x:Key="Label_Top_Highlight_Right" Color="White"/>
  116. <SolidColorBrush x:Key="Label_Top_Highlight_Bottom" Color="#FFD2D2D2"/>
  117. <Style x:Key="Label_Top" TargetType="{x:Type Label}">
  118. <Setter Property="SnapsToDevicePixels" Value="True"/>
  119. <Setter Property="FontSize" Value="14" />
  120. <Setter Property="Margin" Value="0,2,2,2"/>
  121. <Setter Property="Background" Value="{DynamicResource Label_BG}" />
  122. <Setter Property="Foreground" Value="{DynamicResource Foreground_Black}" />
  123. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  124. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  125. </Style>
  126. <SolidColorBrush x:Key="Grid_Foreground" Color="White"/>
  127. <SolidColorBrush x:Key="Grid_BG" Color="#FF1d41d5"/>
  128. <Style x:Key="Label_Grid" TargetType="{x:Type Label}">
  129. <Setter Property="SnapsToDevicePixels" Value="True"/>
  130. <Setter Property="BorderBrush" Value="#ff727996"/>
  131. <Setter Property="BorderThickness" Value="2"/>
  132. <Setter Property="FontSize" Value="25" />
  133. <Setter Property="Margin" Value="0,1,2,0"/>
  134. <Setter Property="Background" Value="{DynamicResource Grid_BG}" />
  135. <Setter Property="Foreground" Value="{DynamicResource Grid_Foreground}" />
  136. <Setter Property="VerticalContentAlignment" Value="Center"/>
  137. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  138. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  139. </Style>
  140. </ResourceDictionary>