<Window x:Class="DesktopMagic.Dialogs.ColorDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:local="clr-namespace:DesktopMagic.Dialogs"
        mc:Ignorable="d"
        ResizeMode="NoResize"
        Title="ColorDialog"
        WindowStartupLocation="CenterOwner"
        SizeToContent="WidthAndHeight">
    <Grid>
        <StackPanel Margin="15">
            <Label x:Name="label" Content="Label" HorizontalAlignment="Left" VerticalAlignment="Top" />

            <DockPanel>
                <Label Content="A:" Width="20" />
                <Slider x:Name="alphaSlider" VerticalAlignment="Center" Maximum="255" ValueChanged="ColorSliders_ValueChanged" TickFrequency="1" IsSnapToTickEnabled="True" Background="#00030000" />
            </DockPanel>
            <DockPanel>
                <Label Content="R:" Width="20" />
                <Slider x:Name="redSlider" VerticalAlignment="Center" Maximum="255" ValueChanged="ColorSliders_ValueChanged" TickFrequency="1" IsSnapToTickEnabled="True" Background="#00030000" />
            </DockPanel>
            <DockPanel>
                <Label Content="G:" Width="20" />
                <Slider x:Name="greenSlider" VerticalAlignment="Center" Maximum="255" ValueChanged="ColorSliders_ValueChanged" TickFrequency="1" IsSnapToTickEnabled="True" Background="#0000FF00" />
            </DockPanel>
            <DockPanel>
                <Label Content="B:" Width="20" />
                <Slider x:Name="blueSlider" VerticalAlignment="Center" Maximum="255" ValueChanged="ColorSliders_ValueChanged" TickFrequency="1" IsSnapToTickEnabled="True" Background="#000000FF" />
            </DockPanel>

            <StackPanel Orientation="Horizontal">
                <Border CornerRadius="1" BorderThickness="1.5" BorderBrush="Gray" Height="23" Width="23"  Margin="0,0,5,0">
                    <Rectangle x:Name="colorRechtangle" Fill="White" />
                </Border>
                <TextBox x:Name="colorHexTextBox" MaxLength="9" CharacterCasing="Upper" Height="23" TextWrapping="Wrap" Width="350" TextChanged="ColorHexTextBox_TextChanged" RenderTransformOrigin="0.5,0.5" VerticalContentAlignment="Center">
                    <materialDesign:TextFieldAssist.CharacterCounterStyle>
                        <Style TargetType="TextBlock" />
                    </materialDesign:TextFieldAssist.CharacterCounterStyle>
                </TextBox>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,0,0">
                <Button x:Name="okButton" Content="{DynamicResource ok }" HorizontalAlignment="Left" Margin="0,0,10,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>
        </StackPanel>
    </Grid>
</Window>