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

    <Page.Resources>
        <Thickness x:Key="NavigationViewHeaderMargin">16,3,0,7</Thickness>
        <Thickness x:Key="NavigationViewMinimalHeaderMargin">18,1,0,0</Thickness>

        <Style x:Key="NavigationViewPaneTitleStyle" TargetType="TextBlock" BasedOn="{StaticResource NavigationViewItemHeaderTextStyle}">
            <Setter Property="FontSize" Value="24" />
        </Style>
    </Page.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition x:Name="MainGridRow" Height="*" />
        </Grid.RowDefinitions>

        <muxcontrols:NavigationView x:Name="NavView" AutomationProperties.Name="NavView" AutomationProperties.AutomationId="NavView"
                Header="|Header|"
                PaneTitle="NavView Test"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                CompactModeThresholdWidth="480"
                Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <muxcontrols:NavigationView.MenuItems>
                <muxcontrols:NavigationViewItem x:Name="HomeItem" Content="Home" Icon="Home"/>
                <muxcontrols:NavigationViewItem x:Name="AppsItem" Content="Apps" Icon="Shop" />
                <muxcontrols:NavigationViewItem x:Name="GamesItem" Content="Games" Icon="Emoji"/>
                <muxcontrols:NavigationViewItemSeparator />
                <muxcontrols:NavigationViewItemHeader x:Name="HeaderTextItem" Content="Header Text" />
                <muxcontrols:NavigationViewItem x:Name="MusicItem" Content="Music" Icon="Audio"/>
                <muxcontrols:NavigationViewItem x:Name="MoviesItem" Content="Movies" Icon="Video"/>
                <muxcontrols:NavigationViewItemHeader x:Name="HeaderTextItem2" Content="Header Text 2" />
                <muxcontrols:NavigationViewItem x:Name="TVItem" Content="TV" Icon="Slideshow"/>
                <muxcontrols:NavigationViewItem x:Name="VolumeItem" Content="Volume" Icon="Volume"/>
            </muxcontrols:NavigationView.MenuItems>

            <ScrollViewer Margin="8,0,0,0">
                <StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <ComboBoxEx x:Name="WidthCombobox" Header="Width"
                                  AutomationProperties.Name="WidthComboBox"
                                  SelectionChanged="WidthCombobox_SelectionChanged"
                                  Margin="12,0,0,0" >
                            <ComboBoxItem Content="300" Tag="300" AutomationProperties.Name="Narrow"/>
                            <ComboBoxItem Content="645" Tag="645" AutomationProperties.Name="Medium"/>
                            <ComboBoxItem Content="1010" Tag="1010" AutomationProperties.Name="Wide"/>
                        </ComboBoxEx>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal">
                        <CheckBox
                            x:Name="IsPaneOpenCheckBox"
                            AutomationProperties.Name="IsPaneOpenCheckBox"
                            Content="IsPaneOpen"
                            IsChecked="{Binding IsPaneOpen, ElementName=NavView, Mode=TwoWay}"
                            Margin="5"/>

                        <CheckBox
                            x:Name="IsPaneVisibleCheckBox"
                            AutomationProperties.Name="IsPaneVisibleCheckBox"
                            Content="IsPaneVisible"
                            IsChecked="{Binding IsPaneVisible, ElementName=NavView, Mode=TwoWay}"
                            Margin="5"/>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal">
                        <ComboBoxEx x:Name="CompactModeCombobox"
                                  Header="Compact Mode"
                                  SelectionChanged="CompactModeCombobox_SelectionChanged"
                                  AutomationProperties.Name="CompactModeComboBox"
                                  Margin="5">
                            <ComboBoxItem Content="0" Tag="0"/>
                            <ComboBoxItem Content="641" Tag="641" AutomationProperties.Name="Low"/>
                            <ComboBoxItem Content="1008" Tag="1008" AutomationProperties.Name="High"/>
                            <ComboBoxItem Content="10 000" Tag="10000"/>
                        </ComboBoxEx>

                        <ComboBoxEx x:Name="ExpandedModeCombobox" 
                                  Header="Expanded Mode"
                                  SelectionChanged="ExpandedModeCombobox_SelectionChanged"
                                  AutomationProperties.Name="ExpandedModeComboBox"
                                  Margin="5">
                            <ComboBoxItem Content="0" Tag="0"/>
                            <ComboBoxItem Content="641" Tag="641" AutomationProperties.Name="Low"/>
                            <ComboBoxItem Content="1008" Tag="1008" AutomationProperties.Name="High"/>
                            <ComboBoxItem Content="10 000" Tag="10000"/>
                        </ComboBoxEx>

                        <ComboBoxEx x:Name="CompactPaneLength" Header="Compact Pane Length" SelectionChanged="CompactPaneLength_SelectionChanged"  Margin="5">
                            <ComboBoxItem Content="0" Tag="0"/>
                            <ComboBoxItem Content="40" Tag="40"/>
                            <ComboBoxItem Content="48" Tag="48"/>
                            <ComboBoxItem Content="96" Tag="96"/>
                        </ComboBoxEx>

                        <ComboBoxEx x:Name="OpenPaneLength" Header="Expanded Pane Length" SelectionChanged="OpenPaneLength_SelectionChanged" Margin="5">
                            <ComboBoxItem Content="0" Tag="0"/>
                            <ComboBoxItem Content="320" Tag="320"/>
                            <ComboBoxItem Content="648" Tag="648"/>
                        </ComboBoxEx>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal">
                        <ComboBoxEx x:Name="HeightCombobox"
                                  Header="Height"
                                  SelectionChanged="HeightCombobox_SelectionChanged"
                                  AutomationProperties.Name="HeightCombobox"
                                  Margin="5">
                            <ComboBoxItem Content="Default" Tag="Default" AutomationProperties.Name="Default" />
                            <ComboBoxItem Content="300" Tag="300" AutomationProperties.Name="Small" />
                        </ComboBoxEx>
                        <CheckBox x:Name="BackButtonVisibilityCheckbox" AutomationProperties.Name="BackButtonVisibilityCheckbox" Content="Back Visible" Checked="BackButtonVisibilityCheckbox_Checked" Unchecked="BackButtonVisibilityCheckbox_Unchecked" IsChecked="True" Margin="5"/>
                        <CheckBox x:Name="BackButtonEnabledCheckbox" AutomationProperties.Name="BackButtonEnabledCheckbox" Content="Back Enabled" Checked="BackButtonEnabledCheckbox_Checked" Unchecked="BackButtonEnabledCheckbox_Unchecked" Margin="5"/>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal">
                        <Button x:Name="ChangePaneTitleText" AutomationProperties.Name="ChangePaneTitleTextButton" Content="Change PaneTitle Text" Margin="0,0,2,0" Click="ChangePaneTitleText_Click"/>
                        <Button x:Name="ChangePaneTitleStyle" AutomationProperties.Name="ChangePaneTitleStyleButton" Content="Change PaneTitle Style" Margin="0,0,2,0" Click="ChangePaneTitleStyle_Click"/>
                        <Button x:Name="FlipOrientation" AutomationProperties.Name="FlipOrientationButton" Content="Flip Orientation" Click="FlipOrientation_Click"/>
                        <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>

                    <StackPanel Orientation="Horizontal">
                        <CheckBox x:Name="SettingsItemVisibilityCheckbox" AutomationProperties.Name="SettingsItemVisibilityCheckbox" Content="Show Settings" Checked="SettingsItemVisibilityCheckbox_Checked" Unchecked="SettingsItemVisibilityCheckbox_Unchecked" Margin="5"/>
                        <CheckBox x:Name="PaneToggleButtonVisiblityCheckbox" AutomationProperties.Name="PaneToggleButtonVisiblityCheckbox" Content="Show Hamburger Button" Checked="PaneToggleButtonVisiblityCheckbox_Checked" Unchecked="PaneToggleButtonVisiblityCheckbox_Unchecked" Margin="5"/>
                        <CheckBox x:Name="HeaderVisiblityCheckbox" AutomationProperties.Name="HeaderVisiblityCheckbox" Content="Always Show Header" Checked="HeaderVisiblityCheckbox_Checked" Unchecked="HeaderVisiblityCheckbox_Unchecked" Margin="5"/>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal">
                        <Button x:Name="ChangeHeaderButton" AutomationProperties.Name="ChangeHeaderButton" Content="Change Header" Click="ChangeHeaderButton_Click"/>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal">
                        <CheckBox x:Name="IsTitleBarAutoPaddingEnabledCheckbox" AutomationProperties.Name="IsTitleBarAutoPaddingEnabledCheckbox" Content="Title Bar Auto-Padding Enabled" Checked="IsTitleBarAutoPaddingEnabledCheckbox_Checked" Unchecked="IsTitleBarAutoPaddingEnabledCheckbox_Unchecked" IsChecked="True"  Margin="5"/>
                        <CheckBox x:Name="TitleBarCheckbox" AutomationProperties.Name="TitleBarCheckbox" Content="Show Title Bar" Checked="TitleBarCheckbox_Checked" Unchecked="TitleBarCheckbox_Unchecked" IsChecked="True"  Margin="5"/>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal" Margin="0 5">
                        <Button x:Name="GetHeaderContentMargin" AutomationProperties.Name="GetHeaderContentMargin" Content="GetHeaderContentMargin" Click="GetHeaderContentMargin_Click"/>
                        <TextBlock Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center">HeaderContent.Margin:</TextBlock>
                        <TextBlock x:Name="HeaderContentMarginResult" AutomationProperties.Name="HeaderContentMarginResult" VerticalAlignment="Center"/>
                        <Button x:Name="GetNavViewActiveVisualStates" AutomationProperties.Name="GetNavViewActiveVisualStates" Content="GetNavViewActiveVisualStates" Click="GetNavViewActiveVisualStates_Click"/>
                        <TextBlock Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center">NavView Active VisualStates:</TextBlock>
                        <TextBlock x:Name="NavViewActiveVisualStatesResult" AutomationProperties.Name="NavViewActiveVisualStatesResult" VerticalAlignment="Center"/>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal" Margin="0 5">
                        <Button x:Name="ChangePaneHeader" AutomationProperties.Name="ChangePaneHeader" Content="ChangePaneHeader" Click="ChangePaneHeader_Click"/>
                    </StackPanel>

                    <TextBlock TextWrapping="Wrap" Grid.Row="1" Margin="5">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris faucibus quam id sem porta posuere. Interdum et malesuada fames ac ante ipsum primis in faucibus. Morbi sodales suscipit justo quis consequat. Vestibulum lectus magna, mattis id eleifend sed, congue eget lectus. Nam et sem pellentesque, dignissim erat eu, tincidunt lacus. Ut porttitor tincidunt ullamcorper. Vestibulum sodales neque purus, vitae eleifend metus convallis in. Etiam non metus nec ligula pharetra molestie. Donec dignissim dapibus blandit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. 
                        
Cras laoreet feugiat nisi, quis consectetur mi mattis et. Integer luctus, nunc ac lobortis volutpat, ligula magna commodo diam, sit amet scelerisque diam mauris nec urna. Sed consectetur, libero at efficitur tincidunt, sem nunc pharetra felis, vitae accumsan lorem ligula at ligula. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam finibus odio ut augue tempor, a egestas leo ornare. Sed varius magna sed tellus tempus viverra. Suspendisse potenti. Pellentesque eget nibh quis quam pellentesque molestie et sit amet arcu. Donec eget sollicitudin metus. Fusce sit amet semper quam. Curabitur quis suscipit lorem. Donec dictum, ipsum eu congue consequat, enim nulla lacinia lorem, nec molestie arcu lacus quis velit. 

Aenean nisl est, sollicitudin eu libero in, aliquam accumsan sapien. Nunc fermentum rutrum augue nec tincidunt. Pellentesque maximus iaculis purus auctor ullamcorper. Proin nec libero id erat tincidunt venenatis sit amet at risus. Nunc sagittis facilisis est ut venenatis. Etiam eget elit hendrerit, dictum libero vel, cursus risus. Nunc nec elit lacus. Nam a libero eros. Nullam nec semper orci. Vivamus sed aliquet eros, et elementum metus. Nullam et suscipit nunc. Curabitur congue urna ut consequat vestibulum. Pellentesque accumsan molestie pellentesque. Duis eget ipsum ac diam bibendum eleifend vitae quis diam. Suspendisse condimentum, turpis eu vehicula dignissim, sem dui euismod neque, eu condimentum arcu ante at mi. Fusce justo neque, congue vel libero ac, consectetur lobortis purus. 

Nullam egestas, orci sed molestie aliquet, diam ex euismod risus, ac dapibus quam magna sit amet odio. Mauris commodo felis lorem, ut faucibus lorem tristique vitae. Maecenas id orci porta, varius velit a, fringilla sem. Maecenas vulputate eu odio a dictum. Pellentesque vitae interdum mauris. Donec et imperdiet est. Suspendisse eget velit in enim varius suscipit. Integer pellentesque egestas magna, sed hendrerit leo dignissim ut. Vestibulum eget placerat libero. Integer accumsan eros leo, vitae auctor purus aliquam vel. Cras rutrum pulvinar velit et commodo. Fusce porta blandit nunc et euismod. Vestibulum sit amet molestie nisl. Fusce odio quam, maximus eu consectetur nec, bibendum a leo. Ut arcu quam, interdum in lectus ut, aliquet semper neque.</TextBlock>
                </StackPanel>
            </ScrollViewer>

            <muxcontrols:NavigationView.PaneFooter>
                <Grid Background="Plum">
                    <Button x:Name="FooterButton" AutomationProperties.Name="FooterButton" Content="Footer Button" Margin="5"/>
                </Grid>
            </muxcontrols:NavigationView.PaneFooter>
        </muxcontrols:NavigationView>
    </Grid>

</local:TestPage>
