<UserControl
    x:Class="Semi.Avalonia.Demo.Pages.ScrollViewerDemo"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="450"
    d:DesignWidth="800"
    mc:Ignorable="d">
    <ScrollViewer>
        <StackPanel HorizontalAlignment="Left" Spacing="20">
            <ToggleSwitch Name="inset" Content="Inset Content" />
            <ToggleSwitch Name="autohide" Content="Allow AutoHide" />
            <ScrollViewer
                Margin="10"
                Width="200" Height="200"
                AllowAutoHide="{Binding #autohide.IsChecked}"
                Classes.InsetContent="{Binding #inset.IsChecked}"
                HorizontalScrollBarVisibility="Auto">
                <UniformGrid
                    Rows="2" Columns="2"
                    Width="300" Height="300">
                    <Rectangle Fill="{DynamicResource SemiYellow2}" />
                    <Rectangle Fill="{DynamicResource SemiBlue2}" />
                    <Rectangle Fill="{DynamicResource SemiPink2}" />
                    <Rectangle Fill="{DynamicResource SemiGreen2}" />
                </UniformGrid>
            </ScrollViewer>
        </StackPanel>
    </ScrollViewer>
</UserControl>