<UserControl
    x:Class="Semi.Avalonia.Demo.Pages.ColorPickerDemo"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker;assembly=Semi.Avalonia.ColorPicker"
    xmlns:controls="using:Avalonia.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="1450"
    d:DesignWidth="800"
    mc:Ignorable="d">
    <ScrollViewer>
        <StackPanel Spacing="20">
            <StackPanel
                VerticalAlignment="Top"
                Orientation="Horizontal"
                Spacing="20">
                <ColorView Name="Test" ColorSpectrumShape="Ring" />
                <ColorView ColorSpectrumShape="Box" />
                <ColorView Palette="{DynamicResource SemiColorPalette}" />
            </StackPanel>
            <StackPanel
                VerticalAlignment="Top"
                Orientation="Horizontal">
                <ColorView
                    Name="SimpleColorViewTest"
                    Theme="{StaticResource SimpleColorView}"
                    IsAlphaVisible="True"
                    HsvColor="hsv(120,11%,10%)" />
                <StackPanel>
                    <TextBlock Text="{Binding #SimpleColorViewTest.HsvColor}" />
                    <TextBlock Text="{Binding #SimpleColorViewTest.Color}" />
                </StackPanel>
            </StackPanel>
            <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
                <ColorPicker ColorSpectrumShape="Ring">
                    <ColorPicker.Palette>
                        <controls:FlatHalfColorPalette />
                    </ColorPicker.Palette>
                </ColorPicker>
                <ColorPicker ColorSpectrumShape="Box">
                    <ColorPicker.Palette>
                        <colorPicker:SemiColorLightPalette />
                    </ColorPicker.Palette>
                </ColorPicker>

                <ColorPicker ColorSpectrumShape="Box" Theme="{DynamicResource HexColorPicker}">
                    <ColorPicker.Palette>
                        <colorPicker:SemiColorLightPalette />
                    </ColorPicker.Palette>
                </ColorPicker>
            </StackPanel>
            <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
                <ColorPicker Theme="{StaticResource SimpleColorPicker}"
                             HsvColor="hsv(120,11%,10%)" />
                <ColorPicker Theme="{StaticResource HexSimpleColorPicker}"
                             HsvColor="hsv(120,11%,10%)" />
            </StackPanel>
        </StackPanel>
    </ScrollViewer>
</UserControl>