<ui:Page
    x:Class="ModernWpf.SampleApp.ControlPages.WindowPage"
    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:ui="http://schemas.modernwpf.com/2019"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    DataContext="{Binding RelativeSource={RelativeSource AncestorType=Window}}">

    <ScrollViewer>
        <ui:SimpleStackPanel
            Spacing="24"
            Margin="{StaticResource ControlPageContentMargin}">

            <CheckBox
                Content="Use modern window style"
                IsChecked="{Binding Path=(ui:WindowHelper.UseModernWindowStyle)}" />

            <ui:RadioButtons
                Header="WindowStyle"
                SelectedItem="{Binding WindowStyle}">
                <WindowStyle>SingleBorderWindow</WindowStyle>
                <WindowStyle>ToolWindow</WindowStyle>
            </ui:RadioButtons>

            <ui:RadioButtons
                Header="ResizeMode"
                ItemsSource="{Binding Source={x:Type ResizeMode}, Converter={StaticResource EnumValuesConverter}}"
                SelectedItem="{Binding ResizeMode}" />

            <ui:DropDownButton Content="Resize window">
                <ui:DropDownButton.Flyout>
                    <ui:MenuFlyout Placement="BottomEdgeAlignedLeft">
                        <MenuItem
                            Header="914 × 686"
                            Click="ResizeWindow" />
                        <MenuItem
                            Header="1000 × 750"
                            Click="ResizeWindow" />
                        <MenuItem
                            Header="1200 × 900"
                            Click="ResizeWindow" />
                        <MenuItem
                            Header="1500 × 900"
                            Click="ResizeWindow" />
                    </ui:MenuFlyout>
                </ui:DropDownButton.Flyout>
            </ui:DropDownButton>

            <GroupBox Header="Title Bar">
                <ui:SimpleStackPanel Spacing="12">
                    <Button
                        Content="Open window with custom title bar"
                        Click="OpenWindow" />
                </ui:SimpleStackPanel>
            </GroupBox>

        </ui:SimpleStackPanel>
    </ScrollViewer>
</ui:Page>
