<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<local:TestPage
    x:Class="MUXControlsTestApp.NavigationViewInitPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:MUXControlsTestApp"
    xmlns:controls="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">

    <Grid Background="Plum">
        <StackPanel>
            <controls:NavigationView x:Name="NavView"
                AutomationProperties.Name="NavView"
                AutomationProperties.AutomationId="NavView"
                CompactModeThresholdWidth="480"
                IsSettingsVisible="False"
                IsPaneToggleButtonVisible="False"
                AlwaysShowHeader="False"
                ItemInvoked="NavView_ItemInvoked"
                SelectionChanged="NavView_SelectionChanged"
                Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

                <StackPanel Orientation="Vertical" Margin="8,0,0,0">
                    <TextBlock Margin="0,8" Text="This tests the initial state of the control, and the ItemsSource property."/>
                    <Button x:Name="AddItemButton" AutomationProperties.Name="AddItemButton" Content="Add Item" Click="AddButton_Click"/>
                    <Button x:Name="RemoveItemButton" AutomationProperties.Name="RemoveItemButton" Content="Remove Item" Click="RemoveButton_Click"/>
                    <Button x:Name="AddFooterItemButton" AutomationProperties.Name="AddFooterItemButton" Content="Add Footer Item" Click="AddFooterButton_Click"/>
                    <Button x:Name="RemoveFooterItemButton" AutomationProperties.Name="RemoveFooterItemButton" Content="Remove Footer Item" Click="RemoveFooterButton_Click"/>
                    <Button x:Name="ChangeToIEnumerableButton" AutomationProperties.Name="ChangeToIEnumerableButton" Content="Make it IEnumerable" Click="ChangeToIEnumerableButton_Clicks"/>
                    <Button x:Name="FlipOrientation" AutomationProperties.Name="FlipOrientationButton" Content="Flip Orientation" Click="FlipOrientation_Click"/>

                    <StackPanel>
                        <Button x:Name="SwitchFrame" AutomationProperties.Name="SwitchFrame" Content="SwitchFrame" Click="SwitchFrame_Click" />
                        <TextBlock x:Name="MyLocationResult" AutomationProperties.Name="MyLocationResult" Text="Unknown"/>

                        <StackPanel Orientation="Horizontal">
                            <Frame x:Name="Frame1" Width="200" Height="200">
                                <Frame.Content>
                                    <controls:NavigationView x:Name="NavView2" IsBackButtonVisible="Collapsed" IsSettingsVisible="False" PaneDisplayMode="Top" ItemInvoked="NavView2_ItemInvoked">
                                        <controls:NavigationView.MenuItems>
                                            <controls:NavigationViewItem Icon="Accept" Content="MyLocation" AutomationProperties.Name="MyLocation" />
                                        </controls:NavigationView.MenuItems>
                                    </controls:NavigationView>
                                </Frame.Content>
                            </Frame>
                            <Frame x:Name="Frame2" Width="200" Height="200"/>
                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center">ItemInvoked Arguments (InvokedItem | InvokedItemContainer):</TextBlock>
                            <TextBox Margin="42,0,0,0" x:Name="ItemInvokedItemType" AutomationProperties.Name="ItemInvokedItemType" Text="N/A"/>
                            <TextBox x:Name="ItemInvokedItemContainerType" AutomationProperties.Name="ItemInvokedItemContainerType" Text="N/A"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center">SelectionChanged Arguments (SelectedItem | SelectedItemContainer):</TextBlock>
                            <TextBox x:Name="SelectionChangedItemType" AutomationProperties.Name="SelectionChangedItemType" Text="N/A"/>
                            <TextBox x:Name="SelectionChangedItemContainerType" AutomationProperties.Name="SelectionChangedItemContainerType" Text="N/A"/>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </controls:NavigationView>
            <controls:NavigationView x:Name="NavView3"
                AutomationProperties.Name="NavView3"
                AutomationProperties.AutomationId="NavView3" >
                <controls:NavigationView.MenuItems>
                    <controls:NavigationViewItem Content="Collection" />
                    <controls:NavigationViewItem Content="Albums" IsSelected="True" />
                    <controls:NavigationViewItem Content="People" IsSelected="True" />
                </controls:NavigationView.MenuItems>
            </controls:NavigationView>
            <controls:NavigationView x:Name="NavView4"
                IsPaneVisible="False">
                <controls:NavigationView.MenuItems>
                    <controls:NavigationViewItem Content="123" AutomationProperties.Name="PaneIsVisibleItem"/>
                </controls:NavigationView.MenuItems>
                <Button Content="Change IsPaneVisible Flag" AutomationProperties.Name="ChangePaneVisible" Click="ChangePaneVisibleButton_Click" />
            </controls:NavigationView>
        </StackPanel>
    </Grid>

</local:TestPage>
