<ResourceDictionary
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:u="https://irihi.tech/ursa">
    <!--  Add Resources Here  -->
    <ControlTheme x:Key="{x:Type u:NavMenu}" TargetType="u:NavMenu">
        <Setter Property="Grid.IsSharedSizeScope" Value="True" />
        <Setter Property="Template">
            <ControlTemplate TargetType="u:NavMenu">
                <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                    <ItemsPresenter ItemsPanel="{TemplateBinding ItemsPanel}" />
                </ScrollViewer>
            </ControlTemplate>
        </Setter>
    </ControlTheme>

    <ControlTheme x:Key="{x:Type u:NavMenuItem}" TargetType="u:NavMenuItem">
        <Setter Property="Template">
            <ControlTemplate TargetType="u:NavMenuItem">
                <Grid Background="{TemplateBinding Background}" RowDefinitions="Auto, *">
                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
                            <ColumnDefinition Width="*" SharedSizeGroup="Header" />
                            <ColumnDefinition Width="Auto" SharedSizeGroup="Expander" />
                        </Grid.ColumnDefinitions>
                        <ContentPresenter
                            Padding="8"
                            HorizontalAlignment="Left"
                            Background="Transparent"
                            Content="{TemplateBinding Icon}"
                            ContentTemplate="{TemplateBinding IconTemplate}" />
                        <ContentPresenter
                            Grid.Column="1"
                            Padding="0,8"
                            Background="Transparent"
                            Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" />
                    </Grid>
                    <ItemsPresenter
                        Grid.Row="1"
                        Margin="20,0,0,0"
                        Grid.IsSharedSizeScope="True"
                        ItemsPanel="{TemplateBinding ItemsPanel}" />
                </Grid>
            </ControlTemplate>
        </Setter>

        <Style Selector="^:selected">
            <Setter Property="Background" Value="{DynamicResource NavigationMenuItemSelectedBackground}" />
        </Style>
    </ControlTheme>
</ResourceDictionary>
