<!-- 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.NavigationViewTopNavStorePage"
    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>
        <controls:NavigationView x:Name="NavView"
            AutomationProperties.Name="NavView"
            AutomationProperties.AutomationId="NavView"
            CompactModeThresholdWidth="480"
            IsSettingsVisible="False"
            IsPaneToggleButtonVisible="False"
            AlwaysShowHeader="False"
            Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
            IsBackButtonVisible="Visible"
            PaneDisplayMode="Top"
            ShoulderNavigationEnabled="WhenSelectionFollowsFocus"
            ItemInvoked="OnNavItemInvoked">

            <controls:NavigationView.PaneHeader>
                <CommandBar>
                    <AppBarToggleButton Icon="Shuffle" Label="Shuffle" Click="AppBarButton_Click" />
                    <CommandBar.SecondaryCommands>
                        <AppBarButton Label="Like" Click="AppBarButton_Click"/>
                    </CommandBar.SecondaryCommands>
                </CommandBar>
            </controls:NavigationView.PaneHeader>

            <controls:NavigationView.PaneCustomContent>
                <CommandBar>
                    <AppBarToggleButton Icon="Like" Label="Like" Click="AppBarButton_Click" />
                </CommandBar>
            </controls:NavigationView.PaneCustomContent>

            <controls:NavigationView.PaneFooter>
                <CommandBar>
                    <AppBarToggleButton Icon="Shuffle" Label="Shuffle" Click="AppBarButton_Click" />
                    <AppBarToggleButton Icon="RepeatAll" Label="Repeat" Click="AppBarButton_Click"/>
                    <AppBarSeparator/>
                    <AppBarButton Icon="Play" Label="Play" Click="AppBarButton_Click"/>

                    <CommandBar.SecondaryCommands>
                        <AppBarButton Label="Like" Click="AppBarButton_Click"/>
                        <AppBarButton Label="Dislike" Click="AppBarButton_Click"/>
                    </CommandBar.SecondaryCommands>
                </CommandBar>
            </controls:NavigationView.PaneFooter>

            <controls:NavigationView.AutoSuggestBox>
                <controls:AutoSuggestBox QueryIcon="Find" AutomationProperties.Name="PaneAutoSuggestBox"/>
            </controls:NavigationView.AutoSuggestBox>

            <StackPanel Background="BurlyWood">
                <ScrollViewer x:Name="ContentScrollViewer" VerticalAlignment="Top" VerticalScrollBarVisibility="Disabled">
                    <StackPanel x:Name="ContentStackPanel" Orientation="Vertical">
                        <StackPanel Orientation="Horizontal">
                            <Button x:Name="MoveContentUnderTopnav" AutomationProperties.Name="MoveContentUnderTopnavButton" Margin="1" Content="Move/Remove content under Top nav + Scrollviewer checkup" Click="MoveContentUnderTopnav_Click"/>
                            <Button x:Name="MoveContentUnderTopnavTitleBar" AutomationProperties.Name="MoveContentUnderTopnavTitleBarButton" Margin="1" Content="Move/Remove content under Top nav + Scrollviewer checkup + Titlebar take over" Click="MoveContentUnderTopnavTitleBar_Click"/>
                            <Button x:Name="GetTopPaddingHeightButton" AutomationProperties.Name="GetTopPaddingHeightButton" Margin="1" Content="Get top padding height" Click="GetTopPaddingHeightButton_Click"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <Button x:Name="AddItemButton" AutomationProperties.Name="AddItemButton" Margin="1" Content="Add Item" Click="AddButton_Click"/>
                            <Button x:Name="AddItemSuppressSelectionButton" AutomationProperties.Name="AddItemSuppressSelectionButton" Margin="1" Content="Add Item with SupppressSelection" Click="AddButtonSuppressSelection_Click"/>
                            <Button x:Name="RemoveItemButton" AutomationProperties.Name="RemoveItemButton" Margin="1" Content="Remove Item" Click="RemoveButton_Click"/>
                            <Button x:Name="ChangeToIEnumerableButton" AutomationProperties.Name="ChangeToIEnumerableButton" Margin="1" Content="Make it IEnumerable" Click="ChangeToIEnumerableButton_Clicks"/>
                            <Button x:Name="FlipIsTitleBarAutoPaddingEnabledButton" AutomationProperties.Name="FlipIsTitleBarAutoPaddingEnabledButton" Margin="1" Content="Flip IsTitleBarAutoPaddingEnabled" Click="FlipIsTitleBarAutoPaddingEnabledButton_Click"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <Button x:Name="FlipOrientation" AutomationProperties.Name="FlipOrientationButton" Margin="1" Content="Flip Orientation" Click="FlipOrientation_Click"/>
                            <Button x:Name="AddRemoveContentOverlay" AutomationProperties.Name="AddRemoveContentOverlayButton" Margin="1" Content="Add/Remove Content Overlay (top nav)" Click="AddRemoveContentOverlay_Click"/>
                            <Button x:Name="ChangeContentOverlayVisibility" AutomationProperties.Name="ChangeContentOverlayVisibilityButton" Margin="1" Content="Change Content Overlay Visibility (top nav)" Click="ChangeContentOverlayVisibility_Click"/>
                            <Button x:Name="ChangeTopNavVisibility" AutomationProperties.Name="ChangeTopNavVisibilityButton" Margin="1" Content="Change Top Nav Visibility" Click="ChangeTopNavVisibility_Click"/>
                            <Button x:Name="ChangeSelectionInCode" AutomationProperties.Name="ChangeSelectionInCodeButton" Margin="1" Content="Change Selection In Code" Click="ChangeSelectionInCode_Click"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <Button x:Name="EnableSelectionFollowsFocusButton" AutomationProperties.Name="EnableSelectionFollowsFocusButton" Margin="1" Content="Enable Selection Follows Focus" Click="EnableSelectionFollowsFocus_Click"/>
                            <Button x:Name="GetActiveVisualState" AutomationProperties.Name="GetActiveVisualState" Margin="1" Content="Get Active VisualState" Click="GetActiveVisualState_Click" />
                            <Button x:Name="GetNavItemActiveVisualState" AutomationProperties.Name="GetNavItemActiveVisualState" Margin="1" Content="Get Selected NavItem Active VisualState" Click="GetNavItemActiveNavItemVisualState_Click" />
                            <Button x:Name="ClearItemInvokedTextButton" AutomationProperties.Name="ClearItemInvokedTextButton" Margin="1" Content="Clear Item Invoked Text" Click="ClearItemInvokedTextButton_Click" />
                        </StackPanel>
                    </StackPanel>
                </ScrollViewer>
                <TextBlock Text="Active NavigationItem Visual States: "/>
                <TextBlock x:Name="ActiveVisualStates" AutomationProperties.Name="ActiveVisualStates"/>
                <TextBlock x:Name="NavItemActiveVisualStates" AutomationProperties.Name="NavItemActiveVisualStates"/>
                <TextBlock Text="NavView.IsTitleBarAutoPaddingEnabled: "/>
                <TextBlock x:Name="NavViewIsTitleBarAutoPaddingEnabled"/>
                <TextBlock Text="Top padding Height: "/>
                <TextBlock x:Name="TopPaddingRenderedValue"/>
                <TextBlock Text="TitleBar.IsVisible: "/>
                <TextBlock x:Name="TitleBarIsVisible"/>
                <TextBlock Text="Item invoked: "/>
                <TextBlock x:Name="ItemInvokedText"/>
            </StackPanel>
        </controls:NavigationView>
    </Grid>
</local:TestPage>
