<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <!--  Add Resources Here  -->
    <ControlTheme x:Key="{x:Type TabStrip}" TargetType="TabStrip">
        <Setter Property="Template">
            <ControlTemplate>
                <Border
                    Padding="{TemplateBinding Padding}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}">
                    <Panel>
                        <ItemsPresenter
                            Name="PART_ItemsPresenter"
                            ItemTemplate="{TemplateBinding ItemTemplate}"
                            Items="{TemplateBinding Items}"
                            ItemsPanel="{TemplateBinding ItemsPanel}" />
                        <Border
                            Name="PART_BorderSeparator"
                            Height="1"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Bottom"
                            Background="{DynamicResource TabItemLinePipePressedBorderBrush}" />
                    </Panel>
                </Border>
            </ControlTemplate>
        </Setter>
        <Setter Property="ItemsPanel">
            <ItemsPanelTemplate>
                <WrapPanel />
            </ItemsPanelTemplate>
        </Setter>
    </ControlTheme>

    <ControlTheme x:Key="{x:Type TabStripItem}" TargetType="TabStripItem">
        <Setter Property="TabStripItem.Background" Value="{DynamicResource TabItemLinePipeBackground}" />
        <Setter Property="TabStripItem.Foreground" Value="{DynamicResource TabItemLineHeaderForeground}" />
        <Setter Property="TabStripItem.Margin" Value="0" />
        <Setter Property="TabStripItem.Padding" Value="8 4" />
        <Setter Property="TabStripItem.MinHeight" Value="5" />
        <Setter Property="TabStripItem.VerticalContentAlignment" Value="Center" />
        <Setter Property="TabStripItem.Template">
            <ControlTemplate TargetType="TabStripItem">
                <Border
                    Name="PART_LayoutRoot"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}">
                    <Panel>
                        <ContentPresenter
                            Name="PART_ContentPresenter"
                            Margin="0,0,0,4"
                            Padding="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontWeight="{TemplateBinding FontWeight}"
                            Foreground="{TemplateBinding Foreground}" />
                        <Border
                            Name="PART_SelectedPipe"
                            Height="2"
                            Margin="0"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Bottom"
                            Background="{DynamicResource TabItemLinePipeBackground}"
                            IsVisible="True"
                            UseLayoutRounding="False" />
                    </Panel>
                </Border>
            </ControlTemplate>
        </Setter>

        <!--  Selected state  -->
        <Style Selector="^:selected /template/ ContentPresenter#PART_ContentPresenter">
            <Setter Property="Foreground" Value="{DynamicResource TabItemLineHeaderSelectedForeground}" />
            <Setter Property="ContentPresenter.FontWeight" Value="{DynamicResource TabItemSelectedFontWeight}" />
        </Style>

        <Style Selector="^:not(:selected)">
            <Setter Property="Cursor" Value="Hand" />
            <Style Selector="^:pointerover /template/ Label#PART_ContentPresenter">
                <Setter Property="Label.Foreground" Value="{DynamicResource TabItemLineHeaderPointeroverForeground}" />
            </Style>
            <Style Selector="^:pointerover /template/ Border#PART_SelectedPipe">
                <Setter Property="Border.Background" Value="{DynamicResource TabItemLinePipePointeroverBorderBrush}" />
            </Style>
            <Style Selector="^:pressed /template/ Border#PART_SelectedPipe">
                <Setter Property="Border.Background" Value="{DynamicResource TabItemLinePipePressedBorderBrush}" />
            </Style>
        </Style>

        <Style Selector="^:selected /template/ Border#PART_SelectedPipe">
            <Setter Property="Border.Background" Value="{DynamicResource TabItemLinePipeSelectedBackground}" />
        </Style>

        <!--  Selected Pressed state  -->
        <Style Selector="^:selected:pressed /template/ Border#PART_LayoutRoot">
            <Setter Property="Background" Value="{DynamicResource TabItemHeaderBackgroundSelectedPressed}" />
            <Setter Property="TextElement.Foreground" Value="{DynamicResource TabItemHeaderForegroundSelectedPressed}" />
        </Style>

        <!--  Disabled state  -->
        <Style Selector="^:disabled /template/ Border#PART_LayoutRoot">
            <Setter Property="Background" Value="{DynamicResource TabItemHeaderBackgroundDisabled}" />
            <Setter Property="TextElement.Foreground" Value="{DynamicResource TabItemHeaderForegroundDisabled}" />
        </Style>
    </ControlTheme>
</ResourceDictionary>
