<UserControl x:Class="ScratchNet.EditorItemControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:ScratchNet"
             xmlns:fc="http://schemas.fontawesome.io/icons/"
        xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid Name="ControlGrid" Margin="5" Background="White" MouseEnter="OnMouseEnter" MouseLeave="OnMouseLeave">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Button Name="EditButton" Grid.Column="0" Margin="0,0,5,0" Visibility="Hidden" VerticalAlignment="Center" Click="OnEditColor">
            <Button.Template>
                <ControlTemplate>
                    <fc:FontAwesome x:Name="Icon" Icon="PencilSquareOutline" Foreground="DarkBlue" FontSize="12" VerticalAlignment="Center"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Icon" Property="Foreground" Value="Green"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Button.Template>
        </Button>
    </Grid>
</UserControl>
