<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<muxcontrols:Page
    x:Class="MUXControlsTestApp.HierarchicalNavigationViewMarkup"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:MUXControlsTestApp"
    xmlns:muxcontrols="http://schemas.modernwpf.com/2019"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Grid>
        <muxcontrols:NavigationView x:Name="navview" ItemInvoked="ClickedItem" Expanding="OnItemExpanding" Collapsed="OnItemCollapsed" PaneDisplayMode="Left" IsSettingsVisible="False">
            <muxcontrols:NavigationView.MenuItems>
                <muxcontrols:NavigationViewItem Content="Menu Item 1" x:Name="MI1" SelectsOnInvoked="False"  Icon="Home">
                    <muxcontrols:NavigationViewItem.MenuItems>
                        <muxcontrols:NavigationViewItem Content="Menu Item 2" x:Name="MI2" SelectsOnInvoked="False" Icon="Save">
                            <muxcontrols:NavigationViewItem.MenuItems>
                                <muxcontrols:NavigationViewItem Content="Menu Item 4" x:Name="MI4" Icon="Cut" />
                                <muxcontrols:NavigationViewItemSeparator />
                                <muxcontrols:NavigationViewItem Content="Menu Item 5" x:Name="MI5" Icon="Paste" />
                            </muxcontrols:NavigationViewItem.MenuItems>
                        </muxcontrols:NavigationViewItem>
                        <muxcontrols:NavigationViewItem Content="Menu Item 3" x:Name="MI3" Icon="Save" />
                        <muxcontrols:NavigationViewItemHeader Content="HEADER 2"/>
                        <muxcontrols:NavigationViewItem Content="Menu Item A" x:Name="MIA" Icon="Cut" />
                        <muxcontrols:NavigationViewItemSeparator />
                        <muxcontrols:NavigationViewItem Content="Menu Item B" x:Name="MIB" Icon="Paste" />
                    </muxcontrols:NavigationViewItem.MenuItems>
                </muxcontrols:NavigationViewItem>
                <muxcontrols:NavigationViewItemHeader Content="HEADER 1"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 6 (Selectable)" x:Name="MI6" SelectsOnInvoked="True" Icon="Cut">
                    <muxcontrols:NavigationViewItem.MenuItems>
                        <muxcontrols:NavigationViewItem Content="Menu Item 7 (Selectable)" x:Name="MI7" SelectsOnInvoked="True">
                            <muxcontrols:NavigationViewItem.MenuItems>
                                <muxcontrols:NavigationViewItem Content="Menu Item 8" x:Name="MI8" />
                                <muxcontrols:NavigationViewItem Content="Menu Item 9" x:Name="MI9" />
                            </muxcontrols:NavigationViewItem.MenuItems>
                        </muxcontrols:NavigationViewItem>
                    </muxcontrols:NavigationViewItem.MenuItems>
                </muxcontrols:NavigationViewItem>
                <muxcontrols:NavigationViewItem Content="Menu Item 10" Icon="Save" x:Name="MI10"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 11" x:Name="MI11" SelectsOnInvoked="False" Icon="Paste">
                    <muxcontrols:NavigationViewItem.MenuItems>
                        <muxcontrols:NavigationViewItem Content="Menu Item 12" Icon="Save" x:Name="MI12" SelectsOnInvoked="False">
                            <muxcontrols:NavigationViewItem.MenuItems>
                                <muxcontrols:NavigationViewItem Content="Menu Item 13" Icon="Cut" x:Name="MI13" />
                                <muxcontrols:NavigationViewItem Content="Menu Item 14" Icon="Paste" x:Name="MI14" />
                            </muxcontrols:NavigationViewItem.MenuItems>
                        </muxcontrols:NavigationViewItem>
                    </muxcontrols:NavigationViewItem.MenuItems>
                </muxcontrols:NavigationViewItem>
                <muxcontrols:NavigationViewItem Content="Menu Item 15" x:Name="MI15" SelectsOnInvoked="False" Icon="Shuffle">
                    <muxcontrols:NavigationViewItem.MenuItems>
                        <muxcontrols:NavigationViewItem Content="Menu Item 16" Icon="Save" x:Name="MI16" />
                        <muxcontrols:NavigationViewItem Content="Menu Item 17" Icon="Cut" x:Name="MI17" />
                        <muxcontrols:NavigationViewItem Content="Menu Item 18" Icon="Paste" x:Name="MI18" />
                    </muxcontrols:NavigationViewItem.MenuItems>
                </muxcontrols:NavigationViewItem>
                <muxcontrols:NavigationViewItem Content="Menu Item 19" x:Name="MI19" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 20" x:Name="MI20" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 21" x:Name="MI21" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 22" x:Name="MI22" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 23" x:Name="MI23" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 24" x:Name="MI24" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 25" x:Name="MI25" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 26" x:Name="MI26" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 27" x:Name="MI27" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 28" x:Name="MI28" SelectsOnInvoked="True"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 29 (Selectable)" x:Name="MI29" SelectsOnInvoked="True">
                    <muxcontrols:NavigationViewItem.MenuItems>
                        <muxcontrols:NavigationViewItem Content="Menu Item 30 (Selectable)" Icon="Save" x:Name="MI30">
                            <muxcontrols:NavigationViewItem.MenuItems>
                                <muxcontrols:NavigationViewItem Content="Menu Item 31" Icon="Cut" x:Name="MI31" />
                                <muxcontrols:NavigationViewItem Content="Menu Item 32" Icon="Paste" x:Name="MI32" />
                            </muxcontrols:NavigationViewItem.MenuItems>
                        </muxcontrols:NavigationViewItem>
                    </muxcontrols:NavigationViewItem.MenuItems>
                </muxcontrols:NavigationViewItem>

            </muxcontrols:NavigationView.MenuItems>
            <StackPanel Margin="10,10,0,0">
                <TextBlock x:Name="SelectedItemLabel" AutomationProperties.Name="SelectedItemLabel" Text="uninitialized"/>
                <Button Content="Get Selected Item Label" x:Name="GetSelectedItemLabelButton" AutomationProperties.Name="GetSelectedItemLabelButton" Click="PrintSelectedItem"/>
                <Button Content="Collapse Selected Item" Click="CollapseSelectedItem"/>
                <Button Content="Remove Second MenuItem" Click="RemoveSecondMenuItem"/>
                <TextBlock x:Name="IsChildSelectedLabel" AutomationProperties.Name="IsChildSelectedLabel" Text="uninitialized"/>
                <Button AutomationProperties.Name="PrintTopLevelIsChildSelectedItemsButton" Content="Print TopLevel IsChildSelected Items" Click="PrintTopLevelIsChildSelectedItems"/>
                <Button Content="Select Second Item" Click="SelectSecondItem"/>
                <!-- Components that get updated when item is expanded or collapsed -->
                <StackPanel x:Name="ExpandCollapseRelatedComponents" Margin="0,10,0,10">
                    <Grid x:Name="ExpandingEventStates">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Margin="0,0,5,0" VerticalAlignment="Center">Last Expanding:</TextBlock>
                        <TextBlock Grid.Column="1" Margin="0,0,10,0" x:Name="TextBlockExpandingItem"  AutomationProperties.Name="TextBlockExpandingItem" Text="N/A"/>
                        <TextBlock Grid.Column="2" Margin="0,0,5,0" VerticalAlignment="Center">Expanding Item and Container match:</TextBlock>
                        <TextBlock Grid.Column="3" x:Name="TextblockExpandingItemAndContainerMatch"  AutomationProperties.Name="TextblockExpandingItemAndContainerMatch" Text="N/A"/>
                    </Grid>
                    <Grid x:Name="CollapsedEventStates">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Margin="0,0,5,0" VerticalAlignment="Center">Last Collapsed:</TextBlock>
                        <TextBlock Grid.Column="1" Margin="0,0,10,0" x:Name="TextBlockCollapsedItem" AutomationProperties.Name="TextBlockCollapsedItem" Text="N/A"/>
                        <TextBlock Grid.Column="2" Margin="0,0,5,0"  VerticalAlignment="Center">Collapsed Item and Container match:</TextBlock>
                        <TextBlock Grid.Column="3" x:Name="TextblockCollapsedItemAndContainerMatch" AutomationProperties.Name="TextblockCollapsedItemAndContainerMatch" Text="N/A"/>
                    </Grid>
                </StackPanel>

                <!-- NavigationViewItem children flyout corner radius test components -->
                <StackPanel Margin="0,10,0,10">
                    <StackPanel Orientation="Horizontal">
                        <Button x:Name="GetMenuItem1ChildrenFlyoutCornerRadiusButton" AutomationProperties.Name="GetMenuItem1ChildrenFlyoutCornerRadiusButton" Content="GetMenuItem1ChildrenFlyoutCornerRadius"
                                Click="GetMenuItem1ChildrenFlyoutCornerRadiusButton_Click"/>
                        <TextBlock Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center">CornerRadius:</TextBlock>
                        <TextBlock x:Name="MenuItem1ChildrenFlyoutCornerRadiusTextBlock" AutomationProperties.Name="MenuItem1ChildrenFlyoutCornerRadiusTextBlock" HorizontalAlignment="Center" VerticalAlignment="Center">-</TextBlock>
                    </StackPanel>
                </StackPanel>

                <!-- Combobox used to switch pane display modes -->
                <ComboBoxEx x:Name="PaneDisplayModeCombobox"
                                AutomationProperties.Name="PaneDisplayModeCombobox"
                                Header="PaneDisplayMode"
                                SelectionChanged="PaneDisplayModeCombobox_SelectionChanged"
                                Margin="5">
                    <ComboBoxItem Content="Auto" Tag="Auto"/>
                    <ComboBoxItem Content="Left" Tag="Left"/>
                    <ComboBoxItem Content="Top" Tag="Top"/>
                    <ComboBoxItem Content="LeftCompact" Tag="LeftCompact"/>
                    <ComboBoxItem Content="LeftMinimal" Tag="LeftMinimal"/>
                </ComboBoxEx>
            </StackPanel>
        </muxcontrols:NavigationView>

    </Grid>
</muxcontrols:Page>
