TextBox.xaml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. x:Class=" MECF.Framework.UI.Client.Themes.lightgreen.TextBoxEx">
  5. <!-- TextBox Style -->
  6. <SolidColorBrush x:Key="TextBox_BD" Color="#FF1B1B1B"/>
  7. <SolidColorBrush x:Key="TextBox_BG" Color="White"/>
  8. <SolidColorBrush x:Key="TextBox_InnerBD" Color="#FFD6D6D6"/>
  9. <SolidColorBrush x:Key="TextBox_InnerLeft" Color="#FF898989"/>
  10. <SolidColorBrush x:Key="TextBox_InnerTop" Color="#FF565656"/>
  11. <SolidColorBrush x:Key="TextBox_InnerRight" Color="#FFD8D8D8"/>
  12. <SolidColorBrush x:Key="TextBox_InnerBottom" Color="#FFE0E0E0"/>
  13. <SolidColorBrush x:Key="TextBox_InnerBD_Unable" Color="#FFBEBDBD"/>
  14. <SolidColorBrush x:Key="TextBox_InnerLeft_Unable" Color="#FFABABAB"/>
  15. <SolidColorBrush x:Key="TextBox_InnerTop_Unable" Color="#FFB4B4B4"/>
  16. <SolidColorBrush x:Key="TextBox_InnerRight_Unable" Color="#FFE7E7E7"/>
  17. <SolidColorBrush x:Key="TextBox_InnerBottom_Unable" Color="#FFE7E7E7"/>
  18. <Style x:Key="ShowTextBox" TargetType="{x:Type TextBox}">
  19. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="OnClick"></EventSetter>
  20. <Setter Property="SnapsToDevicePixels" Value="False"/>
  21. <Setter Property="FontFamily" Value="Arial" />
  22. <Setter Property="FontSize" Value="12" />
  23. <Setter Property="BorderThickness" Value="1,1,1,1"/>
  24. <Setter Property="MinHeight" Value="20" />
  25. <Setter Property="Background" Value="{DynamicResource TextBox_BG}" />
  26. <Setter Property="Foreground" Value="Black" />
  27. <Setter Property="BorderBrush" Value="{DynamicResource TextBox_BD}"/>
  28. <Setter Property="Padding" Value="5,1"/>
  29. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  30. <Setter Property="VerticalContentAlignment" Value="Center"/>
  31. <Setter Property="AllowDrop" Value="true"/>
  32. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  33. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  34. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  35. <Setter Property="Template">
  36. <Setter.Value>
  37. <ControlTemplate TargetType="{x:Type TextBox}">
  38. <Grid>
  39. <Border x:Name="TextBox_Outer" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="4"
  40. BorderBrush="#FF20c9b4" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
  41. <Border x:Name="TextBox_Inner" BorderBrush="{DynamicResource TextBox_InnerBD}" CornerRadius="4" BorderThickness="1,1,1,1" Padding="{TemplateBinding Padding}"/>
  42. </Border>
  43. <Rectangle x:Name="Lfet_Boder" Fill="Transparent" HorizontalAlignment="Left" Width="1" Margin="1"/>
  44. <Rectangle x:Name="Top_Boder" Fill="Transparent" VerticalAlignment="Top" Height="1" Margin="1"/>
  45. <Rectangle x:Name="Right_Boder" Fill="Transparent" HorizontalAlignment="Right" Width="1" Margin="1"/>
  46. <Rectangle x:Name="Bottom_Boder" Fill="Transparent" VerticalAlignment="Bottom" Height="1" Margin="1"/>
  47. <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
  48. </Grid>
  49. <ControlTemplate.Triggers>
  50. <Trigger Property="IsEnabled" Value="false">
  51. <Setter Property="BorderBrush" TargetName="TextBox_Outer" Value="{DynamicResource TextBox_BD_Unable}"/>
  52. <Setter Property="Background" TargetName="TextBox_Outer" Value="#FFf3f3f3"/>
  53. <Setter Property="BorderBrush" TargetName="TextBox_Inner" Value="#FF20c9b4"/>
  54. <Setter Property="Fill" TargetName="Lfet_Boder" Value="Transparent"/>
  55. <Setter Property="Fill" TargetName="Top_Boder" Value="Transparent"/>
  56. <Setter Property="Fill" TargetName="Right_Boder" Value="Transparent"/>
  57. <Setter Property="Fill" TargetName="Bottom_Boder" Value="Transparent"/>
  58. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  59. </Trigger>
  60. </ControlTemplate.Triggers>
  61. </ControlTemplate>
  62. </Setter.Value>
  63. </Setter>
  64. </Style>
  65. <Style x:Key="CommonTextBox" TargetType="{x:Type TextBox}">
  66. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="OnClick"></EventSetter>
  67. <Setter Property="SnapsToDevicePixels" Value="True"/>
  68. <Setter Property="FontFamily" Value="Arial" />
  69. <Setter Property="FontSize" Value="12" />
  70. <Setter Property="BorderThickness" Value="1,1,0,0"/>
  71. <Setter Property="MinHeight" Value="20" />
  72. <Setter Property="Background" Value="{DynamicResource TextBox_BG}" />
  73. <Setter Property="Foreground" Value="Black" />
  74. <Setter Property="BorderBrush" Value="{DynamicResource TextBox_BD}"/>
  75. <Setter Property="Padding" Value="5,1"/>
  76. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  77. <Setter Property="VerticalContentAlignment" Value="Center"/>
  78. <Setter Property="AllowDrop" Value="true"/>
  79. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  80. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  81. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  82. <Setter Property="Template">
  83. <Setter.Value>
  84. <ControlTemplate TargetType="{x:Type TextBox}">
  85. <Grid>
  86. <Border x:Name="TextBox_Outer" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
  87. BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
  88. <Border x:Name="TextBox_Inner" BorderBrush="{DynamicResource TextBox_InnerBD}" BorderThickness="0,0,1,1" Padding="{TemplateBinding Padding}"/>
  89. </Border>
  90. <Rectangle x:Name="Lfet_Boder" Fill="{DynamicResource TextBox_InnerLeft}" HorizontalAlignment="Left" Width="1" Margin="1"/>
  91. <Rectangle x:Name="Top_Boder" Fill="{DynamicResource TextBox_InnerTop}" VerticalAlignment="Top" Height="1" Margin="1"/>
  92. <Rectangle x:Name="Right_Boder" Fill="{DynamicResource TextBox_InnerRight}" HorizontalAlignment="Right" Width="1" Margin="1,2,1,1"/>
  93. <Rectangle x:Name="Bottom_Boder" Fill="{DynamicResource TextBox_InnerBottom}" VerticalAlignment="Bottom" Height="1" Margin="1,1,2,1"/>
  94. <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
  95. </Grid>
  96. <ControlTemplate.Triggers>
  97. <Trigger Property="IsEnabled" Value="false">
  98. <Setter Property="BorderBrush" TargetName="TextBox_Outer" Value="{DynamicResource TextBox_BD_Unable}"/>
  99. <Setter Property="Background" TargetName="TextBox_Outer" Value="{DynamicResource TextBox_BG_Unable}"/>
  100. <Setter Property="BorderBrush" TargetName="TextBox_Inner" Value="{DynamicResource TextBox_InnerBD_Unable}"/>
  101. <Setter Property="Fill" TargetName="Lfet_Boder" Value="{DynamicResource TextBox_InnerLeft_Unable}"/>
  102. <Setter Property="Fill" TargetName="Top_Boder" Value="{DynamicResource TextBox_InnerTop_Unable}"/>
  103. <Setter Property="Fill" TargetName="Right_Boder" Value="{DynamicResource TextBox_InnerRight_Unable}"/>
  104. <Setter Property="Fill" TargetName="Bottom_Boder" Value="{DynamicResource TextBox_InnerBottom_Unable}"/>
  105. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  106. </Trigger>
  107. </ControlTemplate.Triggers>
  108. </ControlTemplate>
  109. </Setter.Value>
  110. </Setter>
  111. </Style>
  112. <Style TargetType="TextBox" BasedOn="{StaticResource CommonTextBox}"/>
  113. <Style TargetType="{x:Type PasswordBox}">
  114. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="OnClick"></EventSetter>
  115. <Setter Property="Background" Value="{DynamicResource TextBox_BG}" />
  116. <Setter Property="Foreground" Value="Black" />
  117. <Setter Property="BorderBrush" Value="{DynamicResource TextBox_BD}"/>
  118. <Setter Property="FontFamily" Value="Times New Roman"/>
  119. <Setter Property="PasswordChar" Value="●"/>
  120. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  121. <Setter Property="BorderThickness" Value="1"/>
  122. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  123. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  124. <Setter Property="AllowDrop" Value="true"/>
  125. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  126. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  127. <Setter Property="Template">
  128. <Setter.Value>
  129. <ControlTemplate TargetType="{x:Type PasswordBox}">
  130. <Grid>
  131. <Border x:Name="TextBox_Outer" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
  132. BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
  133. <Border x:Name="TextBox_Inner" BorderBrush="{DynamicResource TextBox_InnerBD}" BorderThickness="0,0,1,1" Padding="{TemplateBinding Padding}"/>
  134. </Border>
  135. <Rectangle x:Name="Lfet_Boder" Fill="{DynamicResource TextBox_InnerLeft}" HorizontalAlignment="Left" Width="1" Margin="1"/>
  136. <Rectangle x:Name="Top_Boder" Fill="{DynamicResource TextBox_InnerTop}" VerticalAlignment="Top" Height="1" Margin="1"/>
  137. <Rectangle x:Name="Right_Boder" Fill="{DynamicResource TextBox_InnerRight}" HorizontalAlignment="Right" Width="1" Margin="1,2,1,1"/>
  138. <Rectangle x:Name="Bottom_Boder" Fill="{DynamicResource TextBox_InnerBottom}" VerticalAlignment="Bottom" Height="1" Margin="1,1,2,1"/>
  139. <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
  140. </Grid>
  141. <ControlTemplate.Triggers>
  142. <Trigger Property="IsEnabled" Value="false">
  143. <Setter Property="BorderBrush" TargetName="TextBox_Outer" Value="{DynamicResource TextBox_BD_Unable}"/>
  144. <Setter Property="Background" TargetName="TextBox_Outer" Value="{DynamicResource TextBox_BG_Unable}"/>
  145. <Setter Property="BorderBrush" TargetName="TextBox_Inner" Value="{DynamicResource TextBox_InnerBD_Unable}"/>
  146. <Setter Property="Fill" TargetName="Lfet_Boder" Value="{DynamicResource TextBox_InnerLeft_Unable}"/>
  147. <Setter Property="Fill" TargetName="Top_Boder" Value="{DynamicResource TextBox_InnerTop_Unable}"/>
  148. <Setter Property="Fill" TargetName="Right_Boder" Value="{DynamicResource TextBox_InnerRight_Unable}"/>
  149. <Setter Property="Fill" TargetName="Bottom_Boder" Value="{DynamicResource TextBox_InnerBottom_Unable}"/>
  150. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  151. </Trigger>
  152. </ControlTemplate.Triggers>
  153. </ControlTemplate>
  154. </Setter.Value>
  155. </Setter>
  156. </Style>
  157. <ControlTemplate x:Key="ValidationTemplate">
  158. <DockPanel>
  159. <Border BorderBrush="Red" BorderThickness="1">
  160. <AdornedElementPlaceholder/>
  161. </Border>
  162. <TextBlock Foreground="Red" FontSize="20">*</TextBlock>
  163. </DockPanel>
  164. </ControlTemplate>
  165. <!-- TextBox_Top Style -->
  166. <SolidColorBrush x:Key="TextBox_Top_BG" Color="#FFC8E8FF"/>
  167. <SolidColorBrush x:Key="TextBox_Top_Shadow" Color="#FF1B1B1B"/>
  168. <SolidColorBrush x:Key="TextBox_Top_Highlight_Right" Color="White"/>
  169. <SolidColorBrush x:Key="TextBox_Top_Highlight_Bottom" Color="#FFD2D2D2"/>
  170. <Style x:Key="TextBox_Top" TargetType="{x:Type TextBox}">
  171. <Setter Property="SnapsToDevicePixels" Value="True"/>
  172. <Setter Property="FontSize" Value="14" />
  173. <Setter Property="Margin" Value="0,2,2,2"/>
  174. <Setter Property="BorderThickness" Value="0,1,1,1"/>
  175. <Setter Property="Background" Value="{DynamicResource TextBox_Top_BG}" />
  176. <Setter Property="Foreground" Value="{DynamicResource Foreground_Black}" />
  177. <Setter Property="BorderBrush" Value="{DynamicResource TextBox_Top_Highlight_Right}"/>
  178. <Setter Property="Border.CornerRadius" Value="0,6,6,0"/>
  179. <Setter Property="HorizontalAlignment" Value="Stretch"/>
  180. <Setter Property="VerticalAlignment" Value="Stretch"/>
  181. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  182. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  183. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  184. <Setter Property="Template">
  185. <Setter.Value>
  186. <ControlTemplate TargetType="{x:Type TextBox}">
  187. <Grid>
  188. <Border x:Name="TextBox_Bg" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="{TemplateBinding Border.CornerRadius}"
  189. BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
  190. <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="5,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
  191. </Border>
  192. </Grid>
  193. <ControlTemplate.Triggers>
  194. <Trigger Property="IsEnabled" Value="false">
  195. <Setter Property="Background" TargetName="TextBox_Bg" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
  196. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  197. </Trigger>
  198. </ControlTemplate.Triggers>
  199. </ControlTemplate>
  200. </Setter.Value>
  201. </Setter>
  202. </Style>
  203. <Style x:Key="TextBox_RightTop" TargetType="{x:Type TextBox}" BasedOn="{StaticResource TextBox_Top}"/>
  204. <!-- Login TextBox -->
  205. <SolidColorBrush x:Key="TextBox_Login_BG" Color="#FF479480"/>
  206. <SolidColorBrush x:Key="TextBox_Login_BD" Color="#ff366b5d"/>
  207. <SolidColorBrush x:Key="TextBox_BG_Unable" Color="Gainsboro"/>
  208. <SolidColorBrush x:Key="TextBox_BD_Unable" Color="#FF747474"/>
  209. <Style x:Key="Login_TextBox" TargetType="{x:Type TextBox}">
  210. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="OnClick"></EventSetter>
  211. <Setter Property="SnapsToDevicePixels" Value="True"/>
  212. <Setter Property="FontFamily" Value="Arial" />
  213. <Setter Property="FontSize" Value="14" />
  214. <Setter Property="BorderThickness" Value="2"/>
  215. <Setter Property="MinHeight" Value="20" />
  216. <Setter Property="Background" Value="{StaticResource TextBox_Login_BG}"/>
  217. <Setter Property="Foreground" Value="{DynamicResource FG_White}" />
  218. <Setter Property="BorderBrush" Value="{StaticResource TextBox_Login_BD}"/>
  219. <Setter Property="Padding" Value="5,1"/>
  220. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  221. <Setter Property="VerticalContentAlignment" Value="Center"/>
  222. <Setter Property="AllowDrop" Value="true"/>
  223. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  224. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  225. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  226. <Setter Property="Template">
  227. <Setter.Value>
  228. <ControlTemplate TargetType="{x:Type TextBox}">
  229. <Border x:Name="BG" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
  230. <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
  231. </Border>
  232. <ControlTemplate.Triggers>
  233. <Trigger Property="IsEnabled" Value="false">
  234. <Setter Property="BorderBrush" TargetName="BG" Value="{StaticResource TextBox_BD_Unable}"/>
  235. <Setter Property="Background" TargetName="BG" Value="{StaticResource TextBox_BG_Unable}"/>
  236. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  237. </Trigger>
  238. </ControlTemplate.Triggers>
  239. </ControlTemplate>
  240. </Setter.Value>
  241. </Setter>
  242. </Style>
  243. <Style x:Key="Login_PasswordBox" TargetType="{x:Type PasswordBox}">
  244. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="OnClick"></EventSetter>
  245. <Setter Property="Background" Value="{StaticResource TextBox_Login_BG}"/>
  246. <Setter Property="Foreground" Value="{DynamicResource FG_White}" />
  247. <Setter Property="BorderBrush" Value="{StaticResource TextBox_Login_BD}"/>
  248. <Setter Property="SnapsToDevicePixels" Value="True"/>
  249. <Setter Property="FontFamily" Value="Arial" />
  250. <Setter Property="PasswordChar" Value="●"/>
  251. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  252. <Setter Property="BorderThickness" Value="2"/>
  253. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  254. <Setter Property="VerticalContentAlignment" Value="Center"/>
  255. <Setter Property="Padding" Value="5,1"/>
  256. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  257. <Setter Property="AllowDrop" Value="true"/>
  258. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  259. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  260. <Setter Property="Template">
  261. <Setter.Value>
  262. <ControlTemplate TargetType="{x:Type PasswordBox}">
  263. <Border x:Name="BG" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
  264. <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
  265. </Border>
  266. <ControlTemplate.Triggers>
  267. <Trigger Property="IsEnabled" Value="false">
  268. <Setter Property="BorderBrush" TargetName="BG" Value="{StaticResource TextBox_BD_Unable}"/>
  269. <Setter Property="Background" TargetName="BG" Value="{StaticResource TextBox_BG_Unable}"/>
  270. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  271. </Trigger>
  272. </ControlTemplate.Triggers>
  273. </ControlTemplate>
  274. </Setter.Value>
  275. </Setter>
  276. </Style>
  277. <Style x:Key="TextBox_Grid_Title" TargetType="{x:Type TextBox}">
  278. <Setter Property="SnapsToDevicePixels" Value="True"/>
  279. <Setter Property="FontSize" Value="18" />
  280. <Setter Property="Margin" Value="0,2,2,2"/>
  281. <Setter Property="BorderThickness" Value="0,1,1,1"/>
  282. <Setter Property="Background" Value="White" />
  283. <Setter Property="Foreground" Value="{DynamicResource Foreground_Black}" />
  284. <Setter Property="BorderBrush" Value="Black"/>
  285. <Setter Property="Border.CornerRadius" Value="0,6,6,0"/>
  286. <Setter Property="HorizontalAlignment" Value="Stretch"/>
  287. <Setter Property="VerticalAlignment" Value="Stretch"/>
  288. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  289. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  290. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  291. <Setter Property="Template">
  292. <Setter.Value>
  293. <ControlTemplate TargetType="{x:Type TextBox}">
  294. <Grid>
  295. <Border x:Name="TextBox_Bg" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="{TemplateBinding Border.CornerRadius}"
  296. BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
  297. <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="5,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
  298. </Border>
  299. </Grid>
  300. </ControlTemplate>
  301. </Setter.Value>
  302. </Setter>
  303. </Style>
  304. </ResourceDictionary>