1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60:
| <SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/> <LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#F3F3F3" Offset="0"/> <GradientStop Color="#EBEBEB" Offset="0.5"/> <GradientStop Color="#DDDDDD" Offset="0.5"/> <GradientStop Color="#CDCDCD" Offset="1"/> </LinearGradientBrush> <LinearGradientBrush x:Key="TabItemHotBackground" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#EAF6FD" Offset="0.15"/> <GradientStop Color="#D9F0FC" Offset=".5"/> <GradientStop Color="#BEE6FD" Offset=".5"/> <GradientStop Color="#A7D9F5" Offset="1"/> </LinearGradientBrush> <SolidColorBrush x:Key="TabItemSelectedBackground" Color="#F9F9F9"/> <SolidColorBrush x:Key="TabItemHotBorderBrush" Color="#3C7FB1"/> <SolidColorBrush x:Key="TabItemDisabledBackground" Color="#F4F4F4"/> <SolidColorBrush x:Key="TabItemDisabledBorderBrush" Color="#FFC9C7BA"/>
<Style x:Key="TabItemStyle" TargetType="{x:Type TabItem}"> <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/> <Setter Property="Foreground" Value="Black"/> <Setter Property="Padding" Value="6,1,6,1"/> <Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/> <Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Stretch"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TabItem}"> <DockPanel SnapsToDevicePixels="true" Margin="-30,0,0,0" x:Name="grid" Height="177.5" LastChildFill="False" Width="150"> <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,0,0" Padding="{TemplateBinding Padding}" Width="113" Height="71" DockPanel.Dock="Bottom"> <Canvas Width="175.5" Height="200" Margin="-33,-91,0,0"> <StateButton Width="104" Height="48" Canvas.Top="99" Canvas.Left="31.5" x:Name="safeActivationButton" CurrentState="NotActivated" > <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="Content" ContentSource="Header" RecognizesAccessKey="True" /> </StateButton> </Canvas> </Border> </DockPanel> <ControlTemplate.Triggers> <Trigger Property="StateButton.State" Value="Activated" SourceName="safeActivationButton"> <Setter Property="IsSelected" Value="true" /> </Trigger> <Trigger Property="IsSelected" Value="true"> <Setter Property="Panel.ZIndex" Value="1"/> <Setter Property="Background" TargetName="Bd" Value="{DynamicResource TabItemSelectedBackground}"/> <Setter Property="BorderThickness" TargetName="Bd" Value="1,1,1,0"/> <Setter Property="CornerRadius" TargetName="Bd" Value="5,5,0,0"/> <Setter Property="Margin" TargetName="Bd" Value="0,0,0,-2"/> <Setter Property="HorizontalAlignment" TargetName="Content" Value="Center"/> <Setter Property="VerticalAlignment" TargetName="Content" Value="Center"/> <Setter Property="Background" TargetName="safeActivationButton" Value="{x:Null}"/> <Setter Property="BorderBrush" TargetName="safeActivationButton" Value="{x:Null}"/> <Setter Property="IsEnabled" TargetName="safeActivationButton" Value="False"/> <Setter Property="Foreground" TargetName="safeActivationButton" Value="#FF090909"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> |