<!-- 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.NavigationViewIsPaneOpenPage"
    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 
            Width="800"
            x:Name="NavView" 
            AutomationProperties.Name="NavView" 
            AutomationProperties.AutomationId="NavView"
            ItemInvoked="NavigationView_ItemInvoked"
            PaneTitle="NavView Test"
            IsPaneOpen="False">
            <muxcontrols:NavigationView.MenuItems>
                <!-- This NavigationViewItem can be used to check whether selecting an item right after showing it still shows the selection indicator -->
                <!-- See https://github.com/microsoft/microsoft-ui-xaml/issues/2941 for context  -->
                <muxcontrols:NavigationViewItem x:Name="CollapsedItem" Content="Hidden" Icon="Home" Visibility="Collapsed"/>
                <muxcontrols:NavigationViewItem x:Name="HomeItem" Content="Home" Icon="Home"/>
                <muxcontrols:NavigationViewItem x:Name="AppsItem" Content="Apps" Icon="Shop" />
            </muxcontrols:NavigationView.MenuItems>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                <CheckBox
                            x:Name="IsPaneOpenCheckBox"
                            AutomationProperties.Name="IsPaneOpenCheckBox"
                            Content="IsPaneOpen"
                            IsChecked="{Binding IsPaneOpen, ElementName=NavView}"
                            Margin="5"/>
            </StackPanel>
        </muxcontrols:NavigationView>
    </Grid>
</local:TestPage>
