<Styles xmlns="https://github.com/avaloniaui"  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style Selector="TabControl">        
        <Setter Property="Template">
            <ControlTemplate>
                <Border
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Background="{TemplateBinding Background}"
                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalAlignment}">
                    <DockPanel>
                        <ItemsPresenter
                            Name="PART_ItemsPresenter"
                            Items="{TemplateBinding Items}"
                            ItemsPanel="{TemplateBinding ItemsPanel}"
                            ItemTemplate="{TemplateBinding ItemTemplate}">
                        </ItemsPresenter>
                        <ContentPresenter
                            Name="PART_SelectedContentHost"
                            Margin="{TemplateBinding Padding}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding SelectedContent}"
                            ContentTemplate="{TemplateBinding SelectedContentTemplate}">
                        </ContentPresenter>
                    </DockPanel>
                </Border>
            </ControlTemplate>
        </Setter>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Top]">
        <Setter Property="Padding" Value="0 4 0 0"/>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Top] /template/ ItemsPresenter#PART_ItemsPresenter">
        <Setter Property="DockPanel.Dock" Value="Top"/>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Bottom] /template/ ItemsPresenter#PART_ItemsPresenter">
        <Setter Property="DockPanel.Dock" Value="Bottom"/>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Bottom]">
        <Setter Property="Padding" Value="0 0 0 4"/>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Left] /template/ ItemsPresenter#PART_ItemsPresenter">
        <Setter Property="DockPanel.Dock" Value="Left"/>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Left] /template/ ItemsPresenter#PART_ItemsPresenter > WrapPanel">
        <Setter Property="Orientation" Value="Vertical"/>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Left]">
        <Setter Property="Padding" Value="4 0 0 0"/>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Right] /template/ ItemsPresenter#PART_ItemsPresenter">
        <Setter Property="DockPanel.Dock" Value="Right"/>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Right] /template/ ItemsPresenter#PART_ItemsPresenter > WrapPanel">
        <Setter Property="Orientation" Value="Vertical"/>
    </Style>
    <Style Selector="TabControl[TabStripPlacement=Right]">
        <Setter Property="Padding" Value="0 0 4 0"/>
    </Style>
</Styles>
