2026-03-30 17:09:29 +09:00

37 lines
2.7 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="TabControl" BasedOn="{StaticResource {x:Type TabControl}}">
<Setter Property="Background" Value="#1e1e1e"/>
<Setter Property="Foreground" Value="#aaaaaa"/>
</Style>
<Style TargetType="TabItem" BasedOn="{StaticResource {x:Type TabItem}}">
<Setter Property="Background" Value="#1e1e1e"/>
<Setter Property="Foreground" Value="#bbbbbb"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" MinWidth="70" Width="auto" MaxWidth="300" Height="26" Margin="0 0 5 0">
<Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" Margin="0" CornerRadius="5,5,0,0" />
<ContentPresenter x:Name="contentPresenter" ContentSource="Header" Focusable="False" Margin="10 2"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
</Grid>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="False">
<Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" TargetName="mainBorder" Value="#3e3e3e"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" TargetName="mainBorder" Value="#A50034"/>
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>