TabControlStyle.xaml 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:button="clr-namespace:Muchinfo.WPF.Controls.Button;assembly=Client.WPF.Controls"
  4. xmlns:controls="clr-namespace:Muchinfo.WPF.Controls;assembly=Client.WPF.Controls"
  5. xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
  6. <Style x:Key="TabItemFocusVisual">
  7. <Setter Property="Control.Template">
  8. <Setter.Value>
  9. <ControlTemplate>
  10. <Rectangle Margin="3,3,3,1"
  11. SnapsToDevicePixels="true"
  12. Stroke="Black"
  13. StrokeDashArray="1 2"
  14. StrokeThickness="1" />
  15. </ControlTemplate>
  16. </Setter.Value>
  17. </Setter>
  18. </Style>
  19. <SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94" />
  20. <LinearGradientBrush x:Key="TabItemHotBackground" StartPoint="0,0" EndPoint="0,1">
  21. <GradientStop Offset="0.15" Color="#EAF6FD" />
  22. <GradientStop Offset=".5" Color="#D9F0FC" />
  23. <GradientStop Offset=".5" Color="#BEE6FD" />
  24. <GradientStop Offset="1" Color="#A7D9F5" />
  25. </LinearGradientBrush>
  26. <LinearGradientBrush x:Key="ButtonNormalBackground" StartPoint="0,0" EndPoint="0,1">
  27. <GradientStop Offset="0" Color="#F3F3F3" />
  28. <GradientStop Offset="0.5" Color="#EBEBEB" />
  29. <GradientStop Offset="0.5" Color="#DDDDDD" />
  30. <GradientStop Offset="1" Color="#CDCDCD" />
  31. </LinearGradientBrush>
  32. <SolidColorBrush x:Key="TabItemSelectedBackground" Color="#F9F9F9" />
  33. <SolidColorBrush x:Key="TabItemHotBorderBrush" Color="#3C7FB1" />
  34. <SolidColorBrush x:Key="TabItemDisabledBackground" Color="#F4F4F4" />
  35. <SolidColorBrush x:Key="TabItemDisabledBorderBrush" Color="#FFC9C7BA" />
  36. <!-- <SolidColorBrush x:Key="List_Item_IsRead" Color="#c0c0c0" /> -->
  37. <!--
  38. <SolidColorBrush x:Key="List_Item_IsRead" Color="#333333" />
  39. <SolidColorBrush x:Key="List_Item_NotRead" Color="#0067d0" />
  40. -->
  41. <Style x:Key="TabItemStyle1" TargetType="{x:Type TabItem}">
  42. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  43. <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush90}" />
  44. <Setter Property="Padding" Value="6,1,6,1" />
  45. <Setter Property="BorderBrush" Value="{DynamicResource MuchinfoBrush89}" />
  46. <Setter Property="Background" Value="{DynamicResource MuchinfoBrush91}" />
  47. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  48. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  49. <Setter Property="Template">
  50. <Setter.Value>
  51. <ControlTemplate TargetType="{x:Type TabItem}">
  52. <Grid SnapsToDevicePixels="true">
  53. <Border x:Name="Bd"
  54. Background="{TemplateBinding Background}"
  55. BorderBrush="{TemplateBinding BorderBrush}"
  56. BorderThickness="1,1,1,0"
  57. Padding="{TemplateBinding Padding}">
  58. <ContentPresenter x:Name="Content"
  59. HorizontalAlignment="{Binding HorizontalContentAlignment,
  60. RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  61. VerticalAlignment="{Binding VerticalContentAlignment,
  62. RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  63. ContentSource="Header"
  64. RecognizesAccessKey="True"
  65. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  66. </Border>
  67. </Grid>
  68. <ControlTemplate.Triggers>
  69. <Trigger Property="IsMouseOver" Value="true">
  70. <Setter TargetName="Bd" Property="Background" Value="{StaticResource TabItemHotBackground}" />
  71. </Trigger>
  72. <Trigger Property="IsSelected" Value="true">
  73. <Setter Property="Panel.ZIndex" Value="1" />
  74. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource MuchinfoBrush92}" />
  75. </Trigger>
  76. <MultiTrigger>
  77. <MultiTrigger.Conditions>
  78. <Condition Property="IsSelected" Value="false" />
  79. <Condition Property="IsMouseOver" Value="true" />
  80. </MultiTrigger.Conditions>
  81. <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource TabItemHotBorderBrush}" />
  82. </MultiTrigger>
  83. <Trigger Property="TabStripPlacement" Value="Bottom">
  84. <Setter TargetName="Bd" Property="BorderThickness" Value="1,0,1,1" />
  85. </Trigger>
  86. <Trigger Property="TabStripPlacement" Value="Left">
  87. <Setter TargetName="Bd" Property="BorderThickness" Value="1,1,0,1" />
  88. </Trigger>
  89. <Trigger Property="TabStripPlacement" Value="Right">
  90. <Setter TargetName="Bd" Property="BorderThickness" Value="0,1,1,1" />
  91. </Trigger>
  92. <MultiTrigger>
  93. <MultiTrigger.Conditions>
  94. <Condition Property="IsSelected" Value="true" />
  95. <Condition Property="TabStripPlacement" Value="Top" />
  96. </MultiTrigger.Conditions>
  97. <Setter Property="Margin" Value="-2,-2,-2,-1" />
  98. <Setter TargetName="Content" Property="Margin" Value="0,0,0,1" />
  99. </MultiTrigger>
  100. <MultiTrigger>
  101. <MultiTrigger.Conditions>
  102. <Condition Property="IsSelected" Value="true" />
  103. <Condition Property="TabStripPlacement" Value="Bottom" />
  104. </MultiTrigger.Conditions>
  105. <Setter Property="Margin" Value="-2,-1,-2,-2" />
  106. <Setter TargetName="Content" Property="Margin" Value="0,1,0,0" />
  107. </MultiTrigger>
  108. <MultiTrigger>
  109. <MultiTrigger.Conditions>
  110. <Condition Property="IsSelected" Value="true" />
  111. <Condition Property="TabStripPlacement" Value="Left" />
  112. </MultiTrigger.Conditions>
  113. <Setter Property="Margin" Value="-2,-2,-1,-2" />
  114. <Setter TargetName="Content" Property="Margin" Value="0,0,1,0" />
  115. </MultiTrigger>
  116. <MultiTrigger>
  117. <MultiTrigger.Conditions>
  118. <Condition Property="IsSelected" Value="true" />
  119. <Condition Property="TabStripPlacement" Value="Right" />
  120. </MultiTrigger.Conditions>
  121. <Setter Property="Margin" Value="-1,-2,-2,-2" />
  122. <Setter TargetName="Content" Property="Margin" Value="1,0,0,0" />
  123. </MultiTrigger>
  124. <Trigger Property="IsEnabled" Value="false">
  125. <Setter TargetName="Bd" Property="Background" Value="{StaticResource TabItemDisabledBackground}" />
  126. <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource TabItemDisabledBorderBrush}" />
  127. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  128. </Trigger>
  129. </ControlTemplate.Triggers>
  130. </ControlTemplate>
  131. </Setter.Value>
  132. </Setter>
  133. </Style>
  134. <Style x:Key="TabControlStyle1" TargetType="{x:Type TabControl}">
  135. <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush90}" />
  136. <Setter Property="Padding" Value="4,4,4,4" />
  137. <Setter Property="BorderThickness" Value="1" />
  138. <Setter Property="BorderBrush" Value="{DynamicResource MuchinfoBrush89}" />
  139. <Setter Property="Background" Value="{DynamicResource MuchinfoBrush91}" />
  140. <Setter Property="HorizontalContentAlignment" Value="Center" />
  141. <Setter Property="VerticalContentAlignment" Value="Center" />
  142. <Setter Property="Template">
  143. <Setter.Value>
  144. <ControlTemplate TargetType="{x:Type TabControl}">
  145. <Grid ClipToBounds="true"
  146. KeyboardNavigation.TabNavigation="Local"
  147. SnapsToDevicePixels="true">
  148. <Grid.ColumnDefinitions>
  149. <ColumnDefinition x:Name="ColumnDefinition0" />
  150. <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
  151. </Grid.ColumnDefinitions>
  152. <Grid.RowDefinitions>
  153. <RowDefinition x:Name="RowDefinition0" Height="Auto" />
  154. <RowDefinition x:Name="RowDefinition1" Height="*" />
  155. </Grid.RowDefinitions>
  156. <TabPanel x:Name="HeaderPanel"
  157. Grid.Row="0"
  158. Grid.Column="0"
  159. Margin="2,2,2,0"
  160. Panel.ZIndex="1"
  161. IsItemsHost="true"
  162. KeyboardNavigation.TabIndex="1" />
  163. <Border x:Name="ContentPanel"
  164. Grid.Row="1"
  165. Grid.Column="0"
  166. Background="{TemplateBinding Background}"
  167. BorderBrush="{TemplateBinding BorderBrush}"
  168. BorderThickness="{TemplateBinding BorderThickness}"
  169. KeyboardNavigation.DirectionalNavigation="Contained"
  170. KeyboardNavigation.TabIndex="2"
  171. KeyboardNavigation.TabNavigation="Local">
  172. <ContentPresenter x:Name="PART_SelectedContentHost"
  173. Margin="{TemplateBinding Padding}"
  174. ContentSource="SelectedContent"
  175. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  176. </Border>
  177. </Grid>
  178. <ControlTemplate.Triggers>
  179. <Trigger Property="TabStripPlacement" Value="Bottom">
  180. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
  181. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  182. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  183. <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
  184. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
  185. </Trigger>
  186. <Trigger Property="TabStripPlacement" Value="Left">
  187. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  188. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  189. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0" />
  190. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" />
  191. <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
  192. <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
  193. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  194. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  195. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,2,0,2" />
  196. </Trigger>
  197. <Trigger Property="TabStripPlacement" Value="Right">
  198. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  199. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  200. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
  201. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="0" />
  202. <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
  203. <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
  204. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  205. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  206. <Setter TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2" />
  207. </Trigger>
  208. <Trigger Property="IsEnabled" Value="false">
  209. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  210. </Trigger>
  211. </ControlTemplate.Triggers>
  212. </ControlTemplate>
  213. </Setter.Value>
  214. </Setter>
  215. </Style>
  216. <!-- 报价牌样式 -->
  217. <Style x:Key="QuoteTabItemFocusVisual">
  218. <Setter Property="Control.Template">
  219. <Setter.Value>
  220. <ControlTemplate>
  221. <Rectangle Margin="4,4,4,2"
  222. SnapsToDevicePixels="true"
  223. Stroke="{DynamicResource MuchinfoBrush2}"
  224. StrokeDashArray="1 2"
  225. StrokeThickness="1" />
  226. </ControlTemplate>
  227. </Setter.Value>
  228. </Setter>
  229. </Style>
  230. <Style x:Key="QuoteTabItemStyle" TargetType="{x:Type TabItem}">
  231. <Setter Property="Margin" Value="0" />
  232. <Setter Property="Padding" Value="0" />
  233. <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush30}" />
  234. <Setter Property="Background" Value="{DynamicResource ChartBackBrush}" />
  235. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  236. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  237. <Setter Property="Template">
  238. <Setter.Value>
  239. <ControlTemplate TargetType="{x:Type TabItem}">
  240. <themes:ClassicBorderDecorator x:Name="ClassicBorder" SnapsToDevicePixels="true">
  241. <Border Background="{TemplateBinding Background}"
  242. BorderBrush="{DynamicResource MuchinfoBrush31}"
  243. BorderThickness="1,0,1,1"
  244. CornerRadius="0,0,5,30"
  245. Padding="15,0,0,0">
  246. <ContentPresenter Margin="0,0,5,0"
  247. HorizontalAlignment="{Binding HorizontalContentAlignment,
  248. RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  249. VerticalAlignment="{Binding VerticalContentAlignment,
  250. RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  251. ContentSource="Header"
  252. RecognizesAccessKey="True"
  253. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  254. </Border>
  255. </themes:ClassicBorderDecorator>
  256. <ControlTemplate.Triggers>
  257. <Trigger Property="IsSelected" Value="true">
  258. <Setter Property="Margin" Value="-5,-1,0,0" />
  259. <Setter Property="Panel.ZIndex" Value="0" />
  260. <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush29}" />
  261. <Setter Property="BorderThickness" Value="0,0,0,1" />
  262. <Setter Property="BorderBrush" Value="{DynamicResource MuchinfoBrush31}" />
  263. </Trigger>
  264. </ControlTemplate.Triggers>
  265. </ControlTemplate>
  266. </Setter.Value>
  267. </Setter>
  268. </Style>
  269. <Style x:Key="QuoteTabControlStyle" TargetType="{x:Type TabControl}">
  270. <Setter Property="BorderThickness" Value="3" />
  271. <Setter Property="Margin" Value="0" />
  272. <Setter Property="Padding" Value="0" />
  273. <Setter Property="HorizontalContentAlignment" Value="Center" />
  274. <Setter Property="VerticalContentAlignment" Value="Center" />
  275. <Setter Property="Template">
  276. <Setter.Value>
  277. <ControlTemplate TargetType="{x:Type TabControl}">
  278. <Grid ClipToBounds="true"
  279. KeyboardNavigation.TabNavigation="Local"
  280. SnapsToDevicePixels="true">
  281. <Grid.ColumnDefinitions>
  282. <ColumnDefinition x:Name="ColumnDefinition0" />
  283. <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
  284. </Grid.ColumnDefinitions>
  285. <Grid.RowDefinitions>
  286. <RowDefinition x:Name="RowDefinition1" Height="*" />
  287. <RowDefinition x:Name="RowDefinition0" Height="Auto" />
  288. </Grid.RowDefinitions>
  289. <Border Grid.Row="1"
  290. Height="25"
  291. BorderBrush="{DynamicResource MuchinfoBrush31}"
  292. BorderThickness="0,1,0,0">
  293. <TabPanel x:Name="HeaderPanel"
  294. Grid.Column="0"
  295. Margin="0"
  296. Panel.ZIndex="1"
  297. Background="{DynamicResource ChartBackBrush}"
  298. IsItemsHost="true"
  299. KeyboardNavigation.TabIndex="1" />
  300. </Border>
  301. <Grid x:Name="ContentPanel"
  302. Grid.Row="0"
  303. Grid.Column="0"
  304. KeyboardNavigation.DirectionalNavigation="Contained"
  305. KeyboardNavigation.TabIndex="2"
  306. KeyboardNavigation.TabNavigation="Local">
  307. <themes:ClassicBorderDecorator Background="{TemplateBinding Background}"
  308. BorderBrush="{TemplateBinding BorderBrush}"
  309. BorderStyle="Raised"
  310. BorderThickness="{TemplateBinding BorderThickness}">
  311. <ContentPresenter x:Name="PART_SelectedContentHost"
  312. Margin="0"
  313. ContentSource="SelectedContent"
  314. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  315. </themes:ClassicBorderDecorator>
  316. </Grid>
  317. </Grid>
  318. <ControlTemplate.Triggers>
  319. <Trigger Property="TabStripPlacement" Value="Bottom">
  320. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
  321. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  322. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  323. <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
  324. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
  325. </Trigger>
  326. <Trigger Property="TabStripPlacement" Value="Left">
  327. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  328. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  329. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0" />
  330. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" />
  331. <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
  332. <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
  333. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  334. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  335. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,2,0,2" />
  336. </Trigger>
  337. <Trigger Property="TabStripPlacement" Value="Right">
  338. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  339. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  340. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
  341. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="0" />
  342. <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
  343. <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
  344. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  345. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  346. <Setter TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2" />
  347. </Trigger>
  348. <Trigger Property="IsEnabled" Value="false">
  349. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  350. </Trigger>
  351. </ControlTemplate.Triggers>
  352. </ControlTemplate>
  353. </Setter.Value>
  354. </Setter>
  355. </Style>
  356. <Style x:Key="NoticeTabItemStyle" TargetType="{x:Type TabItem}">
  357. <Setter Property="Padding" Value="6,1,6,1" />
  358. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  359. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  360. <Setter Property="Template">
  361. <Setter.Value>
  362. <ControlTemplate TargetType="{x:Type TabItem}">
  363. <Grid SnapsToDevicePixels="true">
  364. <Border x:Name="Bd"
  365. Background="{TemplateBinding Background}"
  366. BorderBrush="{TemplateBinding BorderBrush}"
  367. BorderThickness="1,1,1,0"
  368. Padding="{TemplateBinding Padding}">
  369. <ContentPresenter x:Name="Content"
  370. HorizontalAlignment="{Binding HorizontalContentAlignment,
  371. RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  372. VerticalAlignment="{Binding VerticalContentAlignment,
  373. RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  374. ContentSource="Header"
  375. RecognizesAccessKey="True"
  376. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  377. </Border>
  378. </Grid>
  379. <ControlTemplate.Triggers>
  380. <Trigger Property="IsMouseOver" Value="true">
  381. <Setter TargetName="Bd" Property="Background" Value="{StaticResource TabItemHotBackground}" />
  382. </Trigger>
  383. <Trigger Property="IsSelected" Value="true">
  384. <Setter Property="Panel.ZIndex" Value="1" />
  385. <Setter TargetName="Bd" Property="BorderThickness" Value="0,0,0,2" />
  386. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource SelectedBorderBrush}" />
  387. </Trigger>
  388. <MultiTrigger>
  389. <MultiTrigger.Conditions>
  390. <Condition Property="IsSelected" Value="false" />
  391. <Condition Property="IsMouseOver" Value="true" />
  392. </MultiTrigger.Conditions>
  393. <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource TabItemHotBorderBrush}" />
  394. </MultiTrigger>
  395. <Trigger Property="TabStripPlacement" Value="Bottom">
  396. <Setter TargetName="Bd" Property="BorderThickness" Value="1,0,1,1" />
  397. </Trigger>
  398. <Trigger Property="TabStripPlacement" Value="Left">
  399. <Setter TargetName="Bd" Property="BorderThickness" Value="1,1,0,1" />
  400. </Trigger>
  401. <Trigger Property="TabStripPlacement" Value="Right">
  402. <Setter TargetName="Bd" Property="BorderThickness" Value="0,1,1,1" />
  403. </Trigger>
  404. <MultiTrigger>
  405. <MultiTrigger.Conditions>
  406. <Condition Property="IsSelected" Value="true" />
  407. <Condition Property="TabStripPlacement" Value="Top" />
  408. </MultiTrigger.Conditions>
  409. <Setter Property="Margin" Value="-2,-2,-2,-1" />
  410. <Setter TargetName="Content" Property="Margin" Value="0,0,0,1" />
  411. </MultiTrigger>
  412. <MultiTrigger>
  413. <MultiTrigger.Conditions>
  414. <Condition Property="IsSelected" Value="true" />
  415. <Condition Property="TabStripPlacement" Value="Bottom" />
  416. </MultiTrigger.Conditions>
  417. <Setter Property="Margin" Value="-2,-1,-2,-2" />
  418. <Setter TargetName="Content" Property="Margin" Value="0,1,0,0" />
  419. </MultiTrigger>
  420. <MultiTrigger>
  421. <MultiTrigger.Conditions>
  422. <Condition Property="IsSelected" Value="true" />
  423. <Condition Property="TabStripPlacement" Value="Left" />
  424. </MultiTrigger.Conditions>
  425. <Setter Property="Margin" Value="-2,-2,-1,-2" />
  426. <Setter TargetName="Content" Property="Margin" Value="0,0,1,0" />
  427. </MultiTrigger>
  428. <MultiTrigger>
  429. <MultiTrigger.Conditions>
  430. <Condition Property="IsSelected" Value="true" />
  431. <Condition Property="TabStripPlacement" Value="Right" />
  432. </MultiTrigger.Conditions>
  433. <Setter Property="Margin" Value="-1,-2,-2,-2" />
  434. <Setter TargetName="Content" Property="Margin" Value="1,0,0,0" />
  435. </MultiTrigger>
  436. <Trigger Property="IsEnabled" Value="false">
  437. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  438. </Trigger>
  439. </ControlTemplate.Triggers>
  440. </ControlTemplate>
  441. </Setter.Value>
  442. </Setter>
  443. </Style>
  444. <Style x:Key="NoticeTabControlStyle" TargetType="{x:Type TabControl}">
  445. <Setter Property="Padding" Value="4,4,4,4" />
  446. <Setter Property="BorderThickness" Value="1" />
  447. <Setter Property="HorizontalContentAlignment" Value="Center" />
  448. <Setter Property="VerticalContentAlignment" Value="Center" />
  449. <Setter Property="Template">
  450. <Setter.Value>
  451. <ControlTemplate TargetType="{x:Type TabControl}">
  452. <Grid ClipToBounds="true"
  453. KeyboardNavigation.TabNavigation="Local"
  454. SnapsToDevicePixels="true">
  455. <Grid.ColumnDefinitions>
  456. <ColumnDefinition x:Name="ColumnDefinition0" />
  457. <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
  458. </Grid.ColumnDefinitions>
  459. <Grid.RowDefinitions>
  460. <RowDefinition x:Name="RowDefinition0" Height="Auto" />
  461. <RowDefinition x:Name="RowDefinition1" Height="*" />
  462. </Grid.RowDefinitions>
  463. <TabPanel x:Name="HeaderPanel"
  464. Grid.Row="0"
  465. Grid.Column="0"
  466. Margin="2,2,2,0"
  467. Panel.ZIndex="1"
  468. IsItemsHost="true"
  469. KeyboardNavigation.TabIndex="1" />
  470. <Border x:Name="ContentPanel"
  471. Grid.Row="1"
  472. Grid.Column="0"
  473. Background="{TemplateBinding Background}"
  474. BorderBrush="{TemplateBinding BorderBrush}"
  475. BorderThickness="{TemplateBinding BorderThickness}"
  476. KeyboardNavigation.DirectionalNavigation="Contained"
  477. KeyboardNavigation.TabIndex="2"
  478. KeyboardNavigation.TabNavigation="Local">
  479. <ContentPresenter x:Name="PART_SelectedContentHost"
  480. Margin="{TemplateBinding Padding}"
  481. ContentSource="SelectedContent"
  482. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  483. </Border>
  484. </Grid>
  485. <ControlTemplate.Triggers>
  486. <Trigger Property="TabStripPlacement" Value="Bottom">
  487. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
  488. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  489. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  490. <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
  491. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
  492. </Trigger>
  493. <Trigger Property="TabStripPlacement" Value="Left">
  494. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  495. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  496. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0" />
  497. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" />
  498. <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
  499. <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
  500. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  501. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  502. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,2,0,2" />
  503. </Trigger>
  504. <Trigger Property="TabStripPlacement" Value="Right">
  505. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  506. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  507. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
  508. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="0" />
  509. <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
  510. <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
  511. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  512. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  513. <Setter TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2" />
  514. </Trigger>
  515. <Trigger Property="IsEnabled" Value="false">
  516. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  517. </Trigger>
  518. </ControlTemplate.Triggers>
  519. </ControlTemplate>
  520. </Setter.Value>
  521. </Setter>
  522. </Style>
  523. <Style x:Key="AccountTabItemStyle" TargetType="{x:Type TabItem}">
  524. <Setter Property="Margin" Value="-8,2,0,0" />
  525. <Setter Property="MinWidth" Value="80" />
  526. <Setter Property="Foreground" Value="{DynamicResource NewTabForeground}" />
  527. <Setter Property="Background" Value="{DynamicResource MarketBackground}" />
  528. <Setter Property="HorizontalAlignment" Value="Stretch" />
  529. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  530. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  531. <Setter Property="Template">
  532. <Setter.Value>
  533. <ControlTemplate TargetType="{x:Type TabItem}">
  534. <Grid Width="{TemplateBinding Width}"
  535. Height="{TemplateBinding Height}"
  536. Margin="{TemplateBinding Margin}"
  537. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  538. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  539. <Grid.RowDefinitions>
  540. <RowDefinition Height="Auto" />
  541. </Grid.RowDefinitions>
  542. <!--
  543. <button:ImageButton x:Name="ImgVer"
  544. HoverImageSource="{DynamicResource HorTab_Image_MouseOver}"
  545. ImageHeight="{TemplateBinding Height}"
  546. ImageWidth="{TemplateBinding Width}"
  547. NormalImageSource="{DynamicResource HorTab_Image_Normal}" />
  548. -->
  549. <Image x:Name="ImgVer"
  550. Width="{TemplateBinding Width}"
  551. Height="{TemplateBinding Height}"
  552. Source="{DynamicResource HorTab_Image_Normal}" />
  553. <ContentPresenter x:Name="Content"
  554. HorizontalAlignment="Center"
  555. VerticalAlignment="Center"
  556. ContentSource="Header"
  557. RecognizesAccessKey="True"
  558. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  559. </Grid>
  560. <ControlTemplate.Triggers>
  561. <!--
  562. <MultiTrigger>
  563. <MultiTrigger.Conditions>
  564. <Condition Property="IsMouseOver" Value="True" />
  565. <Condition Property="IsChecked" Value="False" />
  566. </MultiTrigger.Conditions>
  567. <Setter TargetName="rec1" Property="Foreground" Value="{DynamicResource MouseOverBrush}" />
  568. </MultiTrigger>
  569. -->
  570. <Trigger Property="IsMouseOver" Value="True">
  571. <Setter TargetName="ImgVer" Property="Source" Value="{DynamicResource HorTab_Image_MouseOver}" />
  572. </Trigger>
  573. <Trigger Property="IsSelected" Value="True">
  574. <Setter Property="Foreground" Value="{DynamicResource NewTabSelectedForeground}" />
  575. <Setter TargetName="ImgVer" Property="Source" Value="{DynamicResource HorTab_Image_Selected}" />
  576. <Setter Property="Panel.ZIndex" Value="20" />
  577. </Trigger>
  578. </ControlTemplate.Triggers>
  579. </ControlTemplate>
  580. </Setter.Value>
  581. </Setter>
  582. </Style>
  583. <Style x:Key="QuoteTikTabItemStyle" TargetType="{x:Type TabItem}">
  584. <Setter Property="Width" Value="30" />
  585. <Setter Property="Foreground" Value="{DynamicResource TextBlockForeground}" />
  586. <Setter Property="Background" Value="{DynamicResource TreeBackground}" />
  587. <Setter Property="HorizontalAlignment" Value="Stretch" />
  588. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  589. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  590. <Setter Property="Template">
  591. <Setter.Value>
  592. <ControlTemplate TargetType="{x:Type TabItem}">
  593. <Grid Margin="{TemplateBinding Margin}"
  594. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  595. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  596. Background="{TemplateBinding Background}">
  597. <Grid.RowDefinitions>
  598. <RowDefinition Height="Auto" />
  599. </Grid.RowDefinitions>
  600. <!--
  601. <button:ImageButton x:Name="ImgVer"
  602. HoverImageSource="{DynamicResource HorTab_Image_MouseOver}"
  603. ImageHeight="{TemplateBinding Height}"
  604. ImageWidth="{TemplateBinding Width}"
  605. NormalImageSource="{DynamicResource HorTab_Image_Normal}" />
  606. -->
  607. <!--
  608. <Image x:Name="ImgVer" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"
  609. Source="{DynamicResource HorTab_Image_Normal}" />
  610. -->
  611. <ContentPresenter x:Name="Content"
  612. HorizontalAlignment="Center"
  613. VerticalAlignment="Center"
  614. ContentSource="Header"
  615. RecognizesAccessKey="True"
  616. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  617. </Grid>
  618. <ControlTemplate.Triggers>
  619. <!--
  620. <MultiTrigger>
  621. <MultiTrigger.Conditions>
  622. <Condition Property="IsMouseOver" Value="True" />
  623. <Condition Property="IsChecked" Value="False" />
  624. </MultiTrigger.Conditions>
  625. <Setter TargetName="rec1" Property="Foreground" Value="{DynamicResource MouseOverBrush}" />
  626. </MultiTrigger>
  627. -->
  628. <!--
  629. <Trigger Property="IsMouseOver" Value="True">
  630. <Setter TargetName="ImgVer" Property="Source"
  631. Value="{DynamicResource HorTab_Image_MouseOver}" />
  632. </Trigger>
  633. -->
  634. <Trigger Property="IsSelected" Value="True">
  635. <Setter Property="Background" Value="{DynamicResource SelectedBackBrush}" />
  636. <Setter Property="Panel.ZIndex" Value="20" />
  637. </Trigger>
  638. </ControlTemplate.Triggers>
  639. </ControlTemplate>
  640. </Setter.Value>
  641. </Setter>
  642. </Style>
  643. <Style x:Key="TabItemStyle_PageInfo" TargetType="{x:Type TabItem}">
  644. <Setter Property="Margin" Value="-8,2,0,0" />
  645. <Setter Property="MinWidth" Value="98" />
  646. <Setter Property="Foreground" Value="{DynamicResource NewTabForeground}" />
  647. <Setter Property="Background" Value="Transparent" />
  648. <Setter Property="HorizontalAlignment" Value="Stretch" />
  649. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  650. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  651. <Setter Property="Template">
  652. <Setter.Value>
  653. <ControlTemplate TargetType="{x:Type TabItem}">
  654. <Grid Width="{TemplateBinding Width}"
  655. Height="{TemplateBinding Height}"
  656. Margin="{TemplateBinding Margin}"
  657. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  658. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  659. <Grid.RowDefinitions>
  660. <RowDefinition Height="Auto" />
  661. <RowDefinition Height="Auto" />
  662. </Grid.RowDefinitions>
  663. <!--
  664. <button:ImageButton x:Name="ImgVer"
  665. HoverImageSource="{DynamicResource HorTab_Image_MouseOver}"
  666. ImageHeight="{TemplateBinding Height}"
  667. ImageWidth="{TemplateBinding Width}"
  668. NormalImageSource="{DynamicResource HorTab_Image_Normal}" />
  669. -->
  670. <!--
  671. <Image x:Name="ImgVer"
  672. Width="{TemplateBinding Width}"
  673. Height="{TemplateBinding Height}"
  674. Source="{DynamicResource HorTab_Image_Normal}" />
  675. -->
  676. <ContentPresenter x:Name="Content"
  677. HorizontalAlignment="Center"
  678. VerticalAlignment="Center"
  679. ContentSource="Header"
  680. RecognizesAccessKey="True"
  681. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  682. </Grid>
  683. <ControlTemplate.Triggers>
  684. <!--
  685. <MultiTrigger>
  686. <MultiTrigger.Conditions>
  687. <Condition Property="IsMouseOver" Value="True" />
  688. <Condition Property="IsChecked" Value="False" />
  689. </MultiTrigger.Conditions>
  690. <Setter TargetName="rec1" Property="Foreground" Value="{DynamicResource MouseOverBrush}" />
  691. </MultiTrigger>
  692. -->
  693. <Trigger Property="IsMouseOver" Value="True">
  694. <!--
  695. <Setter Property="Cursor" Value="Hand" />
  696. <Setter TargetName="ImgVer" Property="Source" Value="{DynamicResource HorTab_Image_MouseOver}" />
  697. -->
  698. </Trigger>
  699. <Trigger Property="IsSelected" Value="True">
  700. <!--
  701. <Setter Property="Foreground" Value="{DynamicResource NewTabSelectedForeground}" />
  702. <Setter TargetName="ImgVer" Property="Source" Value="{DynamicResource HorTab_Image_Selected}" />
  703. -->
  704. <Setter Property="Panel.ZIndex" Value="20" />
  705. </Trigger>
  706. </ControlTemplate.Triggers>
  707. </ControlTemplate>
  708. </Setter.Value>
  709. </Setter>
  710. </Style>
  711. <Style x:Key="AccountOrderTabControlStyle" TargetType="{x:Type controls:OrderTabControl}">
  712. <Setter Property="Margin" Value="0" />
  713. <Setter Property="Padding" Value="1" />
  714. <Setter Property="MinWidth" Value="10" />
  715. <Setter Property="MinHeight" Value="10" />
  716. <Setter Property="BorderThickness" Value="0" />
  717. <Setter Property="HorizontalAlignment" Value="Stretch" />
  718. <Setter Property="VerticalAlignment" Value="Stretch" />
  719. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  720. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  721. <Setter Property="Template">
  722. <Setter.Value>
  723. <ControlTemplate TargetType="{x:Type controls:OrderTabControl}">
  724. <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  725. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  726. ClipToBounds="True"
  727. KeyboardNavigation.TabNavigation="Local"
  728. SnapsToDevicePixels="True">
  729. <Grid.ColumnDefinitions>
  730. <ColumnDefinition x:Name="ColumnDefinition0" Width="Auto" />
  731. <ColumnDefinition x:Name="ColumnDefinition1" />
  732. </Grid.ColumnDefinitions>
  733. <Grid.RowDefinitions>
  734. <RowDefinition x:Name="RowDefinition0" />
  735. <RowDefinition x:Name="RowDefinition1" Height="Auto" />
  736. </Grid.RowDefinitions>
  737. <StackPanel x:Name="HeaderPanel"
  738. Grid.Row="1"
  739. Grid.Column="0"
  740. Margin="12,0,0,0"
  741. Panel.ZIndex="1"
  742. Background="Transparent"
  743. IsItemsHost="True"
  744. KeyboardNavigation.TabIndex="1"
  745. Orientation="Horizontal" />
  746. <ScrollBar x:Name="PART_HorizontalScrollBar"
  747. Grid.Row="1"
  748. Grid.Column="1"
  749. VerticalAlignment="Bottom"
  750. Background="{Binding Background}"
  751. Maximum="{TemplateBinding ScrollableWidth}"
  752. Orientation="Horizontal"
  753. ViewportSize="{TemplateBinding ViewportWidth}"
  754. Value="{TemplateBinding HSValue}" />
  755. <Grid x:Name="ContentPanel"
  756. Grid.Row="0"
  757. Grid.Column="0"
  758. Grid.ColumnSpan="2"
  759. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  760. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  761. KeyboardNavigation.DirectionalNavigation="Contained"
  762. KeyboardNavigation.TabIndex="2"
  763. KeyboardNavigation.TabNavigation="Local">
  764. <Border Background="{TemplateBinding Background}"
  765. BorderBrush="{TemplateBinding BorderBrush}"
  766. BorderThickness="{TemplateBinding BorderThickness}">
  767. <ContentPresenter x:Name="PART_SelectedContentHost"
  768. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  769. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  770. Content="{TemplateBinding SelectedContent}"
  771. ContentSource="SelectedContent"
  772. ContentStringFormat="{TemplateBinding SelectedContentStringFormat}"
  773. ContentTemplate="{TemplateBinding SelectedContentTemplate}"
  774. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  775. </Border>
  776. </Grid>
  777. </Grid>
  778. <ControlTemplate.Triggers>
  779. <Trigger Property="IsEnabled" Value="False">
  780. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  781. </Trigger>
  782. </ControlTemplate.Triggers>
  783. </ControlTemplate>
  784. </Setter.Value>
  785. </Setter>
  786. </Style>
  787. <Style x:Key="AccountOrderControlStyle" TargetType="{x:Type TabControl}">
  788. <Setter Property="Margin" Value="0" />
  789. <Setter Property="Padding" Value="1" />
  790. <Setter Property="MinWidth" Value="10" />
  791. <Setter Property="MinHeight" Value="10" />
  792. <Setter Property="BorderThickness" Value="0" />
  793. <Setter Property="HorizontalAlignment" Value="Stretch" />
  794. <Setter Property="VerticalAlignment" Value="Stretch" />
  795. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  796. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  797. <Setter Property="Template">
  798. <Setter.Value>
  799. <ControlTemplate TargetType="{x:Type TabControl}">
  800. <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  801. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  802. ClipToBounds="True"
  803. KeyboardNavigation.TabNavigation="Local"
  804. SnapsToDevicePixels="True">
  805. <Grid.ColumnDefinitions>
  806. <ColumnDefinition x:Name="ColumnDefinition0" Width="Auto" />
  807. <ColumnDefinition x:Name="ColumnDefinition1" />
  808. </Grid.ColumnDefinitions>
  809. <Grid.RowDefinitions>
  810. <RowDefinition x:Name="RowDefinition0" />
  811. <RowDefinition x:Name="RowDefinition1" Height="Auto" />
  812. </Grid.RowDefinitions>
  813. <StackPanel x:Name="HeaderPanel"
  814. Grid.Row="1"
  815. Grid.Column="0"
  816. Margin="12,0,0,0"
  817. Panel.ZIndex="1"
  818. Background="Transparent"
  819. IsItemsHost="True"
  820. KeyboardNavigation.TabIndex="1"
  821. Orientation="Horizontal" />
  822. <!--
  823. <ScrollBar Name="PART_HorizontalScrollBar"
  824. Grid.Row="1"
  825. Grid.Column="1"
  826. VerticalAlignment="Bottom"
  827. Background="{Binding Background}"
  828. Maximum="{Binding ScrollableWidth,
  829. ElementName=Part_TabViewer}"
  830. Orientation="Horizontal"
  831. ViewportSize="{Binding ViewportWidth,
  832. ElementName=Part_TabViewer}" />
  833. -->
  834. <Grid x:Name="ContentPanel"
  835. Grid.Row="0"
  836. Grid.Column="0"
  837. Grid.ColumnSpan="2"
  838. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  839. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  840. KeyboardNavigation.DirectionalNavigation="Contained"
  841. KeyboardNavigation.TabIndex="2"
  842. KeyboardNavigation.TabNavigation="Local">
  843. <Border Background="{TemplateBinding Background}"
  844. BorderBrush="{TemplateBinding BorderBrush}"
  845. BorderThickness="{TemplateBinding BorderThickness}">
  846. <ScrollViewer x:Name="Part_TabViewer"
  847. HorizontalScrollBarVisibility="Hidden"
  848. VerticalScrollBarVisibility="Disabled">
  849. <ContentPresenter x:Name="PART_SelectedContentHost"
  850. Margin="2"
  851. Content="{TemplateBinding SelectedContent}"
  852. ContentSource="SelectedContent"
  853. ContentStringFormat="{TemplateBinding SelectedContentStringFormat}"
  854. ContentTemplate="{TemplateBinding SelectedContentTemplate}"
  855. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  856. </ScrollViewer>
  857. </Border>
  858. </Grid>
  859. </Grid>
  860. <ControlTemplate.Triggers>
  861. <Trigger Property="IsEnabled" Value="False">
  862. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  863. </Trigger>
  864. </ControlTemplate.Triggers>
  865. </ControlTemplate>
  866. </Setter.Value>
  867. </Setter>
  868. </Style>
  869. </ResourceDictionary>