<UserControl
             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:hearthstoneDeckTracker="clr-namespace:Hearthstone_Deck_Tracker"
             x:Class="Hearthstone_Deck_Tracker.Controls.CardMarker"
             mc:Ignorable="d"
             DataContext="{Binding RelativeSource={RelativeSource Self}}"
             d:DesignHeight="56" d:DesignWidth="32">
    <Canvas LayoutTransform="{Binding ScaleTransform}">
        <Canvas Width="32" Height="32">
            <Canvas.Background>
               <ImageBrush ImageSource="/HearthstoneDeckTracker;component/Images/card-marker.png"/>
            </Canvas.Background>
            <hearthstoneDeckTracker:HearthstoneTextBlock
                FontSize="18" Width="32" Height="32" TextAlignment="Center"
                Text="{Binding CardAge}" Visibility="{Binding CardAgeVisibility}"
                d:Text="1"
            />
        </Canvas>
        <Border Canvas.Left="4" Canvas.Top="32" BorderThickness="2" CornerRadius="3" BorderBrush="#141617" Visibility="{Binding SourceCardVisibility}">
            <Grid>
                <Rectangle Width="20" Height="20">
                    <Rectangle.Fill>
                        <ImageBrush ImageSource="{Binding SourceCardBitmap}" />
                    </Rectangle.Fill>
                </Rectangle>
                <Image Width="16" Height="16" Margin="-8" HorizontalAlignment="Left" VerticalAlignment="Top" Source="{Binding Icon}" />
            </Grid>
        </Border>
        <Image
            Width="16" Height="16" Canvas.Left="18" Canvas.Top="18"
            Source="{Binding Icon}" d:Source="/HearthstoneDeckTracker;component/Images/card-icon-created.png"
            Visibility="{Binding IconVisibility}" d:Visibility="Visible"
        />
        <hearthstoneDeckTracker:HearthstoneTextBlock Fill="DodgerBlue" FontSize="13" Canvas.Left="17" Canvas.Top="-2"  Width="16" Height="16" TextAlignment="Right"
                                                     Text="{Binding CostReduction}" Visibility="{Binding CostReductionVisibility}"/>
    </Canvas>
</UserControl>
