123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d">
- <SolidColorBrush x:Key="Tab_Header_BG" Color="#FF456D9A"/>
- <SolidColorBrush x:Key="Tab_BD" Color="#FF233661"/>
- <SolidColorBrush x:Key="Tab_BD_Highlight" Color="#FFB3B9D1"/>
- <SolidColorBrush x:Key="Tab_Header_BG_MouseOver" Color="#FF57A3D4"/>
- <SolidColorBrush x:Key="Tab_Header_BG_Select" Color="#FF8CA9C7"/>
- <SolidColorBrush x:Key="Tab_BD_Select" Color="#FF6788B1"/>
- <SolidColorBrush x:Key="Tab_BD_Highlight_Select" Color="#00B3B9D1"/>
- <SolidColorBrush x:Key="Tab_FG_Select" Color="#FF233863"/>
- <SolidColorBrush x:Key="Tab_BG" Color="#FFDBE5F1"/>
- <SolidColorBrush x:Key="Tab_BD_Unable" Color="Gray"/>
- <LinearGradientBrush x:Key="Tab_Header_BG_Unable" EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#FFB1B1B1" Offset="0"/>
- <GradientStop Color="#FFDADADA" Offset="1"/>
- </LinearGradientBrush>
- <SolidColorBrush x:Key="Tab_BG_Unable" Color="LightGray"/>
- <Style x:Key="TabItemFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Stroke="#7FFFFFFF" StrokeDashArray="1 2" StrokeThickness="1" Margin="3,3,3,1" SnapsToDevicePixels="true"/>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type TabControl}">
- <Setter Property="Padding" Value="5"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="BorderBrush" Value="{DynamicResource Tab_BD}"/>
- <Setter Property="Background" Value="{DynamicResource Tab_BG}"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Border.CornerRadius" Value="5"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabControl}">
- <Grid>
- <Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
- <Grid.ColumnDefinitions>
- <ColumnDefinition x:Name="ColumnDefinition0"/>
- <ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition x:Name="RowDefinition0" Height="Auto"/>
- <RowDefinition x:Name="RowDefinition1" Height="*"/>
- </Grid.RowDefinitions>
- <TabPanel x:Name="HeaderPanel" Margin="3,0,0,0" IsItemsHost="true" Panel.ZIndex="1" Grid.Column="0" Grid.Row="0" KeyboardNavigation.TabIndex="1"/>
- <Border x:Name="ContentPanel" CornerRadius="{TemplateBinding Border.CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Grid.Column="0" Grid.Row="1" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
- <ContentPresenter x:Name="PART_SelectedContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="SelectedContent"/>
- </Border>
- </Grid>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="TabStripPlacement" Value="Bottom">
- <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1"/>
- <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
- <Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
- <Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
- <Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2"/>
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Left">
- <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
- <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
- <Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0"/>
- <Setter Property="Grid.Column" TargetName="ContentPanel" Value="1"/>
- <Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto"/>
- <Setter Property="Width" TargetName="ColumnDefinition1" Value="*"/>
- <Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
- <Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
- <Setter Property="Margin" TargetName="HeaderPanel" Value="2,2,0,2"/>
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Right">
- <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
- <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
- <Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1"/>
- <Setter Property="Grid.Column" TargetName="ContentPanel" Value="0"/>
- <Setter Property="Width" TargetName="ColumnDefinition0" Value="*"/>
- <Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto"/>
- <Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
- <Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
- <Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="BorderBrush" TargetName="ContentPanel" Value="{DynamicResource Tab_BD_Unable}"/>
- <Setter Property="Background" TargetName="ContentPanel" Value="{DynamicResource Tab_BG_Unable}"/>
- <Setter Property="Foreground" Value="#FF9A9A9A"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type TabItem}">
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
- <Setter Property="Foreground" Value="{DynamicResource FG_White}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource Tab_BD}"/>
- <Setter Property="Background" Value="{DynamicResource Tab_Header_BG}"/>
- <Setter Property="FontFamily" Value="Arial"/>
- <Setter Property="FontSize" Value="12"/>
- <Setter Property="MinWidth" Value="80"/>
- <Setter Property="MinHeight" Value="24"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabItem}">
- <Border x:Name="BG" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="5,5,0,0" Background="{TemplateBinding Background}" Cursor="Hand">
- <Border x:Name="InnerBD" BorderBrush="{DynamicResource Tab_BD_Highlight}" BorderThickness="1,1,0,0" CornerRadius="4,4,0,0">
- <ContentPresenter x:Name="Content" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" RecognizesAccessKey="True" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,3,10,1">
- </ContentPresenter>
- </Border>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true" SourceName="BG">
- <Setter Property="Background" TargetName="BG" Value="{DynamicResource Tab_Header_BG_MouseOver}"/>
- </Trigger>
- <Trigger Property="IsSelected" Value="true">
- <Setter Property="Background" TargetName="BG" Value="{DynamicResource Tab_BG}"/>
- <Setter Property="BorderBrush" TargetName="BG" Value="{DynamicResource Tab_BG}"/>
- <Setter Property="BorderBrush" TargetName="InnerBD" Value="{DynamicResource Tab_BD_Highlight_Select}"/>
- <Setter Property="Foreground" Value="{DynamicResource Tab_FG_Select}"/>
- <Setter Property="FontSize" Value="14"/>
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Bottom">
- <Setter Property="BorderThickness" TargetName="BG" Value="1,0,1,1"/>
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Left">
- <Setter Property="BorderThickness" TargetName="BG" Value="1,1,0,1"/>
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Right">
- <Setter Property="BorderThickness" TargetName="BG" Value="0,1,1,1"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="true"/>
- <Condition Property="TabStripPlacement" Value="Top"/>
- </MultiTrigger.Conditions>
- <Setter Property="Margin" TargetName="Content" Value="10,3,10,1"/>
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="true"/>
- <Condition Property="TabStripPlacement" Value="Bottom"/>
- </MultiTrigger.Conditions>
- <Setter Property="Margin" TargetName="Content" Value="5,1,5,0"/>
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="true"/>
- <Condition Property="TabStripPlacement" Value="Left"/>
- </MultiTrigger.Conditions>
- <Setter Property="Margin" TargetName="Content" Value="5,0,6,0"/>
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="true"/>
- <Condition Property="TabStripPlacement" Value="Right"/>
- </MultiTrigger.Conditions>
- <Setter Property="Margin" TargetName="Content" Value="6,0,5,0"/>
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="BorderBrush" Value="{DynamicResource Tab_BD_Unable}"/>
- <Setter Property="Background" TargetName="BG" Value="{DynamicResource Tab_Header_BG_Unable}"/>
- <Setter Property="Foreground" Value="#FF9A9A9A"/>
- <Setter Property="Effect" TargetName="Content">
- <Setter.Value>
- <DropShadowEffect BlurRadius="0" ShadowDepth="1" Opacity="0"/>
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|