<!-- 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.NavigationViewTopNavOverflowButtonPage"
    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">

    <StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
                HorizontalAlignment="Left">
        <!-- The width and number of NavigationView menu items have been set in such a way that the overflow menu button
        is visible and the overflow menu only contains a single item. -->
        <muxcontrols:NavigationView x:Name="NavView"
                                    PaneDisplayMode="Top"
                                    IsBackButtonVisible="Collapsed"
                                    MinWidth="100" Width="499">
            <muxcontrols:NavigationView.MenuItems>
                <muxcontrols:NavigationViewItem Content="Menu Item 1"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 2" />
                <muxcontrols:NavigationViewItem Content="Menu Item 3"/>
                <muxcontrols:NavigationViewItem Content="Menu Item 4"/>
            </muxcontrols:NavigationView.MenuItems>
        </muxcontrols:NavigationView>

        <StackPanel Orientation="Horizontal" Margin="8,10,0,0">
            <Button x:Name="AddItem4Button" AutomationProperties.Name="AddItem4Button" Click="AddItem4Button_Click" Margin="5,0,0,0" Content="Add Menu Item 4"/>
            <Button x:Name="RemoveFirstItemButton" AutomationProperties.Name="RemoveFirstItemButton" Click="RemoveFirstItemButton_Click" Margin="5,0,0,0" Content="Remove First Item"/>
            <Button x:Name="RemoveLastItemButton" AutomationProperties.Name="RemoveLastItemButton" Click="RemoveLastItemButton_Click" Margin="5,0,0,0" Content="Remove Last Item"/>
        </StackPanel>
    </StackPanel>
</local:TestPage>
