TextBoxStyle.xaml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  2. <Style x:Key="PagesView_txtContext" TargetType="{x:Type TextBlock}">
  3. <Setter Property="FontFamily" Value="Segoe UI" />
  4. <Setter Property="FontSize" Value="12" />
  5. </Style>
  6. <Style x:Key="ViewMode_txtContext" TargetType="{x:Type TextBlock}">
  7. <Setter Property="FontFamily" Value="Segoe UI" />
  8. <Setter Property="FontSize" Value="11" />
  9. </Style>
  10. <Style x:Key="PagesView_titleContext" TargetType="{x:Type TextBlock}">
  11. <Setter Property="FontFamily" Value=" Segoe UI Semibold" />
  12. <Setter Property="FontWeight" Value="SemiBold" />
  13. <Setter Property="FontSize" Value="14" />
  14. </Style>
  15. <!-- style for property seconed title -->
  16. <Style x:Key="PropertyHeaderLv2" TargetType="{x:Type TextBlock}">
  17. <Setter Property="FontFamily" Value="Segoe UI" />
  18. <Setter Property="FontSize" Value="12" />
  19. <Setter Property="LineHeight" Value="20" />
  20. <Setter Property="FontWeight" Value="SemiBold" />
  21. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
  22. </Style>
  23. <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3" />
  24. <SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA" />
  25. <SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5" />
  26. <Style x:Key="TextBoxStyleRadius" TargetType="{x:Type TextBox}">
  27. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
  28. <Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}" />
  29. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  30. <Setter Property="BorderThickness" Value="1" />
  31. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  32. <Setter Property="HorizontalContentAlignment" Value="Left" />
  33. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  34. <Setter Property="AllowDrop" Value="true" />
  35. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  36. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  37. <Setter Property="Template">
  38. <Setter.Value>
  39. <ControlTemplate TargetType="{x:Type TextBox}">
  40. <Border
  41. x:Name="border"
  42. Background="{TemplateBinding Background}"
  43. BorderBrush="{TemplateBinding BorderBrush}"
  44. BorderThickness="{TemplateBinding BorderThickness}"
  45. CornerRadius="4"
  46. SnapsToDevicePixels="True">
  47. <ScrollViewer
  48. x:Name="PART_ContentHost"
  49. Focusable="false"
  50. HorizontalScrollBarVisibility="Hidden"
  51. VerticalScrollBarVisibility="Hidden" />
  52. </Border>
  53. <ControlTemplate.Triggers>
  54. <Trigger Property="IsEnabled" Value="false">
  55. <Setter TargetName="border" Property="Opacity" Value="0.56" />
  56. </Trigger>
  57. <Trigger Property="IsMouseOver" Value="true">
  58. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.MouseOver.Border}" />
  59. </Trigger>
  60. <Trigger Property="IsKeyboardFocused" Value="true">
  61. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.Focus.Border}" />
  62. </Trigger>
  63. </ControlTemplate.Triggers>
  64. </ControlTemplate>
  65. </Setter.Value>
  66. </Setter>
  67. <Style.Triggers>
  68. <MultiTrigger>
  69. <MultiTrigger.Conditions>
  70. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  71. <Condition Property="IsSelectionActive" Value="false" />
  72. </MultiTrigger.Conditions>
  73. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  74. </MultiTrigger>
  75. </Style.Triggers>
  76. </Style>
  77. <Style x:Key="Print_normalTxtStyle" TargetType="TextBox">
  78. <Setter Property="Template">
  79. <Setter.Value>
  80. <ControlTemplate>
  81. <Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
  82. <Border BorderBrush="{StaticResource color.field.border.norm}" Background="{StaticResource color.field.bg.def}" BorderThickness="1" CornerRadius="4">
  83. <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
  84. HorizontalScrollBarVisibility="Hidden"
  85. VerticalScrollBarVisibility="Hidden"
  86. VerticalAlignment="Center" MinHeight="22" Margin="8,0,0,0" Opacity="1" />
  87. </Border>
  88. </Grid>
  89. <ControlTemplate.Triggers>
  90. <Trigger Property="IsEnabled" Value="False">
  91. <Setter Property="Opacity" Value="0.6"></Setter>
  92. </Trigger>
  93. </ControlTemplate.Triggers>
  94. </ControlTemplate>
  95. </Setter.Value>
  96. </Setter>
  97. </Style>
  98. </ResourceDictionary>