<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <!--  Add Resources Here  -->
    <ControlTheme x:Key="{x:Type TabControl}" TargetType="TabControl">
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Background" Value="{DynamicResource TabControlBackground}" />
        <Setter Property="Template">
            <ControlTemplate TargetType="TabControl">
                <Border
                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalAlignment}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}">
                    <DockPanel>
                        <Panel DockPanel.Dock="{TemplateBinding TabStripPlacement}">
                            <ItemsPresenter
                                Name="PART_ItemsPresenter"
                                ItemTemplate="{TemplateBinding ItemTemplate}"
                                Items="{TemplateBinding Items}"
                                ItemsPanel="{TemplateBinding ItemsPanel}" />
                            <Border Name="PART_BorderSeparator" Background="{DynamicResource TabItemLinePipePressedBorderBrush}" />
                        </Panel>
                        <ContentPresenter
                            Name="PART_SelectedContentHost"
                            Margin="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding SelectedContent}"
                            ContentTemplate="{TemplateBinding SelectedContentTemplate}" />
                    </DockPanel>
                </Border>
            </ControlTemplate>
        </Setter>

        <Style Selector="^[TabStripPlacement=Left] /template/ ItemsPresenter#PART_ItemsPresenter &gt; WrapPanel">
            <Setter Property="Orientation" Value="Vertical" />
        </Style>
        <Style Selector="^[TabStripPlacement=Right] /template/ ItemsPresenter#PART_ItemsPresenter &gt; WrapPanel">
            <Setter Property="Orientation" Value="Vertical" />
        </Style>
        <Style Selector="^[TabStripPlacement=Left] /template/ Border#PART_BorderSeparator">
            <Setter Property="Border.Width" Value="1" />
            <Setter Property="Border.VerticalAlignment" Value="Stretch" />
            <Setter Property="Border.HorizontalAlignment" Value="Left" />
        </Style>
        <Style Selector="^[TabStripPlacement=Right] /template/ Border#PART_BorderSeparator">
            <Setter Property="Border.Width" Value="1" />
            <Setter Property="Border.VerticalAlignment" Value="Stretch" />
            <Setter Property="Border.HorizontalAlignment" Value="Right" />
        </Style>
        <Style Selector="^[TabStripPlacement=Top] /template/ Border#PART_BorderSeparator">
            <Setter Property="Border.Height" Value="1" />
            <Setter Property="Border.HorizontalAlignment" Value="Stretch" />
            <Setter Property="Border.VerticalAlignment" Value="Bottom" />
        </Style>
        <Style Selector="^[TabStripPlacement=Bottom] /template/ Border#PART_BorderSeparator">
            <Setter Property="Border.Height" Value="1" />
            <Setter Property="Border.HorizontalAlignment" Value="Stretch" />
            <Setter Property="Border.VerticalAlignment" Value="Top" />
        </Style>
        <!--
        <Style Selector="^[TabStripPlacement=Top] /template/ ItemsPresenter#PART_ItemsPresenter">
            <Setter Property="Margin" Value="8" />
        </Style>
        -->
    </ControlTheme>
</ResourceDictionary>
