<ui:FluentWindow x:Class="DesktopMagic.Dialogs.ColorDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
        xmlns:tray="http://schemas.lepo.co/wpfui/2022/xaml/tray"
        xmlns:pages="clr-namespace:DesktopMagic.Pages"
        xmlns:plugins="clr-namespace:DesktopMagic.Plugins"
        mc:Ignorable="d"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:dataContext="clr-namespace:DesktopMagic.DataContexts"
        d:DataContext="{d:DesignInstance Type=dataContext:MainWindowDataContext}"
        ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
        ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
        Foreground="{DynamicResource TextFillColorPrimaryBrush}"
        WindowCornerPreference="Round"
        WindowBackdropType="Tabbed"
        Height="300"
        Width="450"
        MinHeight="300"
        MinWidth="450"
        WindowStartupLocation="CenterOwner"
        ExtendsContentIntoTitleBar="True">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ui:TitleBar ShowMinimize="False" ShowMaximize="False">
            <ui:TitleBar.Icon>
                <ui:ImageIcon Source="{StaticResource Icon}" />
            </ui:TitleBar.Icon>
        </ui:TitleBar>

        <StackPanel Grid.Row="1" Margin="15">
            <Label x:Name="label" Content="Label" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <Grid Margin="{StaticResource DefaultMargin}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>

                <DockPanel Grid.Row="0">
                    <Label Content="A:" Width="20" />
                    <Slider x:Name="alphaSlider" VerticalAlignment="Center" Maximum="255" ValueChanged="ColorSliders_ValueChanged" TickFrequency="1" IsSnapToTickEnabled="True" />
                </DockPanel>
                <DockPanel Grid.Row="1">
                    <Label Content="R:" Width="20" />
                    <Slider x:Name="redSlider" VerticalAlignment="Center" Maximum="255" ValueChanged="ColorSliders_ValueChanged" TickFrequency="1" IsSnapToTickEnabled="True" />
                </DockPanel>
                <DockPanel Grid.Row="2">
                    <Label Content="G:" Width="20" />
                    <Slider x:Name="greenSlider" VerticalAlignment="Center" Maximum="255" ValueChanged="ColorSliders_ValueChanged" TickFrequency="1" IsSnapToTickEnabled="True" />
                </DockPanel>
                <DockPanel Grid.Row="3">
                    <Label Content="B:" Width="20" />
                    <Slider x:Name="blueSlider" VerticalAlignment="Center" Maximum="255" ValueChanged="ColorSliders_ValueChanged" TickFrequency="1" IsSnapToTickEnabled="True" />
                </DockPanel>
            </Grid>
            <DockPanel Margin="0 5 0 0">
                <Border x:Name="colorRechtangle" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource ControlElevationBorderBrush}" Background="White" Height="30" Width="30" Margin="0,0,10,0" />
                <TextBox x:Name="colorHexTextBox" MaxLength="9" CharacterCasing="Upper" TextWrapping="Wrap" TextChanged="ColorHexTextBox_TextChanged" RenderTransformOrigin="0.5,0.5" VerticalContentAlignment="Center"/>
            </DockPanel>
        </StackPanel>
        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="5">
            <Button x:Name="okButton" Content="{DynamicResource ok }" HorizontalAlignment="Left" Margin="0 0 5 0" VerticalAlignment="Top" Width="100" Click="OkButton_Click" Cursor="Hand" />
            <Button x:Name="cancelButton" Content="{DynamicResource cancel }" HorizontalAlignment="Left" Margin="0 0 0 0" VerticalAlignment="Top" Width="100" Click="CancelButton_Click" />
        </StackPanel>
    </Grid>
</ui:FluentWindow>