<ResourceDictionary
    x:ClassModifier="internal"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ControlTheme TargetType="ListBoxItem" x:Key="{x:Type ListBoxItem}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <ControlTemplate>
                <ContentPresenter
                    Background="{DynamicResource SecondaryBackgroundColor}"
                    BorderBrush="{DynamicResource MainBorderColor}"
                    BorderThickness="1"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    CornerRadius="0"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Name="PART_ContentPresenter"
                    Padding="{TemplateBinding Padding}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
            </ControlTemplate>
        </Setter>

        <Style Selector="^:pointerover /template/ ContentPresenter">
            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryAccentColor}" />
        </Style>

        <Style Selector="^:selected /template/ ContentPresenter">
            <Setter Property="BorderBrush" Value="{DynamicResource AccentColor}" />
        </Style>

        <Style Selector="^:selected:focus /template/ ContentPresenter">
            <Setter Property="BorderBrush" Value="{DynamicResource AccentColor}" />
        </Style>

        <Style Selector="^:selected:pointerover /template/ ContentPresenter">
            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryAccentColor}" />
        </Style>

        <Style Selector="^:selected:focus:pointerover /template/ ContentPresenter">
            <Setter Property="BorderBrush" Value="{DynamicResource SecondaryAccentColor}" />
        </Style>
    </ControlTheme>
</ResourceDictionary>