<Window x:Class="FFXIV_TexTools.Views.Textures.EditChannelsWindow"
        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:local="clr-namespace:FFXIV_TexTools.Views.Textures"
        mc:Ignorable="d"
        Title="Channel Editor" Height="450" Width="400">
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="10"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>

            <RowDefinition Height="40"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>

        <Label Content="Channel:" HorizontalAlignment="Right" VerticalAlignment="Center"></Label>
        <ComboBox x:Name="SelectedChannelBox" Width="100" Margin="5" Grid.Column="1" HorizontalAlignment="Left" ItemsSource="{Binding Path=Channels}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedValue="{Binding Path=SelectedChannel}" VerticalAlignment="Center"/>

        <Separator Grid.Row="1" Grid.ColumnSpan="2"></Separator>

        <Grid x:Name="CoreGrid" Grid.Row="2" Grid.ColumnSpan="2" Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition Height="40"></RowDefinition>
                <RowDefinition Height="40"></RowDefinition>
                <RowDefinition Height="40"></RowDefinition>
                <RowDefinition Height="40"></RowDefinition>
                <RowDefinition Height="40"></RowDefinition>
                <RowDefinition Height="40"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"></ColumnDefinition>
                <ColumnDefinition Width="120"></ColumnDefinition>
                <ColumnDefinition Width="120"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            
            <Button Grid.Row="0" Grid.Column="0" Content="Brighten" VerticalAlignment="Center" Margin="5" Click="Brighten_Click"/>
            <Button Grid.Row="0" Grid.Column="1" Content="Darken" VerticalAlignment="Center" Margin="5" Click="Darken_Click"/>

            
            <Button Grid.Row="1" Grid.Column="0" Content="Fill" VerticalAlignment="Center" Margin="5" Click="Fill_Click"/>
            <Slider Grid.Row="1" Grid.Column="1" Maximum="255" Minimum="0" Value="{Binding Path=GreyValue}"></Slider>
            <TextBox Grid.Row="1" Grid.Column="2" Text="{Binding Path=GreyValue}" VerticalAlignment="Center" Margin="5"/>

            <Button Grid.Row="2" Grid.Column="0" Content="Invert" VerticalAlignment="Center" Margin="5" Click="Invert_Click"/>

            <Button Grid.Row="3" Grid.Column="0" Content="Copy To" VerticalAlignment="Center" Margin="5" Click="Copy_Click"/>
            <ComboBox Grid.Row="3" Margin="5" Grid.Column="1" ItemsSource="{Binding Path=OtherChannels}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedValue="{Binding Path=CopyChannel}" VerticalAlignment="Center"/>

            <Button Grid.Row="4" Grid.Column="0" Content="Swap With" VerticalAlignment="Center" Margin="5" Click="Swap_Click"/>
            <ComboBox Grid.Row="4" Margin="5" Grid.Column="1" ItemsSource="{Binding Path=OtherChannels}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedValue="{Binding Path=SwapChannel}" VerticalAlignment="Center"/>


        </Grid>

        <Button Content="Cancel" Grid.ColumnSpan="2" Grid.Row="3" HorizontalAlignment="Left" Width="150" VerticalAlignment="Center" Margin="5" Click="Cancel_Click"></Button>
        <Button Content="Apply Changes" Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Right" Width="150" VerticalAlignment="Center" Margin="5" Click="Confirm_Click"></Button>
    </Grid>
</Window>
