2021-04-29 05:05:55 -07:00
|
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2021-08-10 19:49:52 -07:00
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:models="clr-namespace:SourceGit.Models">
|
2020-07-03 00:24:31 -07:00
|
|
|
<Style TargetType="{x:Type TabControl}">
|
|
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="{x:Type TabControl}">
|
|
|
|
<Grid KeyboardNavigation.TabNavigation="Local">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<TabPanel x:Name="HeaderPanel" Grid.Row="0" IsItemsHost="True" KeyboardNavigation.TabIndex="1" Background="Transparent" />
|
|
|
|
<Border
|
|
|
|
x:Name="Border"
|
|
|
|
Grid.Row="1"
|
|
|
|
Background="Transparent"
|
|
|
|
KeyboardNavigation.TabNavigation="Local"
|
|
|
|
KeyboardNavigation.DirectionalNavigation="Contained"
|
|
|
|
KeyboardNavigation.TabIndex="2">
|
2021-04-29 05:05:55 -07:00
|
|
|
<ContentPresenter
|
|
|
|
x:Name="PART_SelectedContentHost"
|
|
|
|
Margin="4"
|
|
|
|
ContentSource="SelectedContent"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type TabItem}">
|
2021-04-29 05:05:55 -07:00
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
2020-07-03 00:24:31 -07:00
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="{x:Type TabItem}">
|
2021-04-29 05:05:55 -07:00
|
|
|
<Border
|
|
|
|
x:Name="Border"
|
|
|
|
BorderThickness="0,0,0,1"
|
2021-05-17 18:08:55 -07:00
|
|
|
BorderBrush="Transparent"
|
|
|
|
Opacity=".56">
|
2021-04-29 05:05:55 -07:00
|
|
|
<ContentPresenter
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
HorizontalAlignment="Center"
|
2020-07-03 00:24:31 -07:00
|
|
|
ContentSource="Header"
|
2021-05-17 18:08:55 -07:00
|
|
|
Margin="8,4">
|
2021-04-29 05:05:55 -07:00
|
|
|
<ContentPresenter.Resources>
|
2021-08-04 22:44:25 -07:00
|
|
|
<Style TargetType="{x:Type TextBlock}" BasedOn="{x:Null}">
|
2021-05-17 18:08:55 -07:00
|
|
|
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
|
|
|
|
<Setter Property="FontWeight" Value="DemiBold"/>
|
2021-08-04 22:44:25 -07:00
|
|
|
<Setter Property="FontSize" Value="9pt"/>
|
|
|
|
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
|
2021-08-10 19:49:52 -07:00
|
|
|
<Setter Property="TextElement.FontFamily" Value="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyWindow, Mode=OneWay}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<Style.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Path=IsSelected}" Value="True">
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent1}"/>
|
|
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
</ContentPresenter.Resources>
|
|
|
|
</ContentPresenter>
|
2020-07-03 00:24:31 -07:00
|
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource Brush.Accent1}"/>
|
2021-05-17 18:08:55 -07:00
|
|
|
<Setter TargetName="Border" Property="Opacity" Value="1"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
</Trigger>
|
|
|
|
<MultiTrigger>
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
<Condition Property="IsSelected" Value="False"/>
|
|
|
|
<Condition Property="IsMouseOver" Value="True"/>
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource Brush.Accent2}"/>
|
2021-05-17 18:08:55 -07:00
|
|
|
<Setter TargetName="Border" Property="Opacity" Value=".7"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
</MultiTrigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|