<ui:Page
    x:Class="ModernWpf.SampleApp.ControlPages.ControlPalettePage"
    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:local="clr-namespace:ModernWpf.SampleApp.ControlPages"
    mc:Ignorable="d"
    Background="{DynamicResource AppBackgroundBrush}">

    <Grid
        Margin="12"
        Background="{DynamicResource AppContentBackgroundBrush}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <ui:ThemeShadowChrome
            x:Name="Shadow"
            Grid.Column="0"
            Grid.ColumnSpan="2"
            Depth="8"
            IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />

        <Border
            Grid.Column="0"
            Background="{DynamicResource RegionBrush}"
            CornerRadius="2 0 0 2"
            ui:ThemeManager.RequestedTheme="Light" />
        <Border
            Grid.Column="1"
            Background="{DynamicResource RegionBrush}"
            CornerRadius="0 2 2 0"
            ui:ThemeManager.RequestedTheme="Dark" />

        <ScrollViewer
            x:Name="ContentScrollViewer"
            Grid.ColumnSpan="2"
            ui:ThemeManager.RequestedTheme="Dark">
            <Grid VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <Border
                    Grid.Column="0"
                    VerticalAlignment="Top"
                    ui:ThemeManager.RequestedTheme="Light">
                    <local:ControlPaletteTestContent
                        Title="Light theme"
                        VerticalAlignment="Top" />
                </Border>

                <Border
                    Grid.Column="1"
                    VerticalAlignment="Top"
                    ui:ThemeManager.RequestedTheme="Dark">
                    <local:ControlPaletteTestContent
                        Title="Dark theme"
                        VerticalAlignment="Top" />
                </Border>
            </Grid>
        </ScrollViewer>
    </Grid>
</ui:Page>
