<UserControl x:Class="PixiEditor.Views.UserControls.ShortcutsTemplateCard"
             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:PixiEditor.Views.UserControls"
             mc:Ignorable="d" Background="Transparent"
             d:DesignHeight="150" d:DesignWidth="150" Name="card">
    <Border BorderThickness="1" Height="150" Width="150" Background="{StaticResource MainColor}" 
            CornerRadius="15" MouseEnter="OnBorderMouseEnter" MouseLeave="BorderMouseLeave">
        <Border.Triggers>
            <EventTrigger RoutedEvent="Border.MouseEnter">
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Width" 
                                         From="72" To="100" Duration="0:0:0.15"/>
                        <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Height" 
                                         From="72" To="100" Duration="0:0:0.15" />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
            <EventTrigger RoutedEvent="Border.MouseLeave">
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Width" 
                                         From="100" To="72" Duration="0:0:0.15"/>
                        <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Height" 
                                         From="100" To="72" Duration="0:0:0.15" />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Border.Triggers>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="30"/>
            </Grid.RowDefinitions>
            <Image Grid.Row="0" Grid.RowSpan="2" Name="img" HorizontalAlignment="Center" VerticalAlignment="Center" Height="72" Width="72" Source="{Binding ElementName=card, Path=Logo}"/>
            <Label Grid.Row="1" HorizontalAlignment="Center" FontWeight="Bold" Margin="0" Padding="0" Style="{StaticResource BaseLabel}"
                   Content="{Binding ElementName=card, Path=TemplateName}"/>
        </Grid>
    </Border>
</UserControl>
