<ui:Page
    x:Class="ModernWpf.SampleApp.ControlPages.MenuPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:sc="clr-namespace:SamplesCommon;assembly=SamplesCommon"
    mc:Ignorable="d">

    <ScrollViewer>
        <ui:SimpleStackPanel Style="{StaticResource ControlPageContentPanelStyle}">
            <sc:ControlExample HeaderText="A simple Menu">
                <Menu>
                    <MenuItem Header="File">
                        <MenuItem Header="New" />
                        <MenuItem Header="Open..." />
                        <MenuItem Header="Save" />
                        <MenuItem Header="Exit" />
                    </MenuItem>

                    <MenuItem Header="Edit">
                        <MenuItem Header="Undo" />
                        <MenuItem Header="Cut" />
                        <MenuItem Header="Copy" />
                        <MenuItem Header="Paste" />
                    </MenuItem>

                    <MenuItem Header="Help">
                        <MenuItem Header="About" />
                    </MenuItem>
                </Menu>
            </sc:ControlExample>
            <sc:ControlExample HeaderText="Menu with input gesture texts">
                <Menu>
                    <MenuItem Header="File">
                        <MenuItem
                            Header="New"
                            InputGestureText="Ctrl+N" />
                        <MenuItem
                            Header="Open..."
                            InputGestureText="Ctrl+O" />
                        <MenuItem
                            Header="Save"
                            InputGestureText="Ctrl+S" />
                        <MenuItem
                            Header="Exit"
                            InputGestureText="Ctrl+E" />
                    </MenuItem>

                    <MenuItem Header="Edit">
                        <MenuItem
                            Header="Undo"
                            InputGestureText="Ctrl+Z" />
                        <MenuItem
                            Header="Cut"
                            InputGestureText="Ctrl+X" />
                        <MenuItem
                            Header="Copy"
                            InputGestureText="Ctrl+C" />
                        <MenuItem
                            Header="Paste"
                            InputGestureText="Ctrl+V" />
                    </MenuItem>

                    <MenuItem Header="Help">
                        <MenuItem
                            Header="About"
                            InputGestureText="Ctrl+I" />
                    </MenuItem>
                </Menu>
            </sc:ControlExample>
            <sc:ControlExample HeaderText="Menu with submenus, separators, and radio items">
                <Menu>
                    <MenuItem Header="File">
                        <MenuItem Header="New">
                            <MenuItem Header="Plain Text Document" />
                            <MenuItem Header="Rich Text Document" />
                            <MenuItem Header="Other Formats..." />
                        </MenuItem>
                        <MenuItem Header="Open..." />
                        <MenuItem Header="Save" />
                        <Separator />
                        <MenuItem Header="Exit" />
                    </MenuItem>

                    <MenuItem Header="Edit">
                        <MenuItem Header="Undo" />
                        <MenuItem Header="Cut" />
                        <MenuItem Header="Copy" />
                        <MenuItem Header="Paste" />
                    </MenuItem>

                    <MenuItem Header="View">
                        <MenuItem Header="Output" />
                        <Separator />
                        <ui:RadioMenuItem
                            Header="Landscape"
                            GroupName="OrientationGroup" />
                        <ui:RadioMenuItem
                            Header="Portrait"
                            GroupName="OrientationGroup"
                            IsChecked="True" />
                        <Separator />
                        <ui:RadioMenuItem
                            Header="Small icons"
                            GroupName="SizeGroup" />
                        <ui:RadioMenuItem
                            Header="Medium icons"
                            GroupName="SizeGroup"
                            IsChecked="True" />
                        <ui:RadioMenuItem
                            Header="Large icons"
                            GroupName="SizeGroup" />
                    </MenuItem>

                    <MenuItem Header="Help">
                        <MenuItem Header="About" />
                    </MenuItem>
                </Menu>
            </sc:ControlExample>
        </ui:SimpleStackPanel>
    </ScrollViewer>
</ui:Page>
