<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Design.PreviewWith>
    <Border Padding="20">
      <ListBox>
        <ListBoxItem>Test</ListBoxItem>
        <ListBoxItem>Test</ListBoxItem>
        <ListBoxItem>Test</ListBoxItem>
        <ListBoxItem>Test</ListBoxItem>
      </ListBox>
    </Border>
  </Design.PreviewWith>
  <Style Selector="ListBox">
    <Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" />
    <Setter Property="Background" Value="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" />
    <Setter Property="BorderBrush" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" />
    <Setter Property="BorderThickness" Value="{DynamicResource ListBoxBorderThemeThickness}" />
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />        
    <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />        
    <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />    
    <Setter Property="Template">
      <ControlTemplate>
        <Border Name="border"
                ClipToBounds="{TemplateBinding ClipToBounds}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{TemplateBinding CornerRadius}">
          <ScrollViewer Name="PART_ScrollViewer"
                        HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
                        VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}"
                        IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
                        AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}">
            <ItemsPresenter Name="PART_ItemsPresenter"
                            Items="{TemplateBinding Items}"
                            ItemsPanel="{TemplateBinding ItemsPanel}"
                            ItemTemplate="{TemplateBinding ItemTemplate}"
                            Margin="{TemplateBinding Padding}"
                            VirtualizationMode="{TemplateBinding VirtualizationMode}"/>
          </ScrollViewer>
        </Border>
      </ControlTemplate>
    </Setter>
  </Style>
</Styles>
