Label.xaml 7.6 KB

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