<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="C1_Demo.DemoDragDropManager" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:C1_Demo">
    <UserControl.Resources>
        <Style x:Key="BlackBackground" TargetType="Border">
            <Setter Property="Background" Value="#FF134F5C" />
        </Style>
        <Style x:Key="WhiteBackground" TargetType="Border">
            <Setter Property="Background" Value="#FFCFE2F3" />
        </Style>
        <Style x:Key="Player1" TargetType="local:PieceControl">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:PieceControl">
                        <Ellipse Margin="3" RenderTransformOrigin="0.5,0.5" StrokeThickness="2" Fill="#FFFFFFFF" Stroke="#FFAAAAAA" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="Player2" TargetType="local:PieceControl">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:PieceControl">
                        <Ellipse Margin="3" RenderTransformOrigin="0.5,0.5" StrokeThickness="2" Fill="Black" Stroke="#FF444444" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Storyboard x:Name="PlayAgainAnimation">
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="borderTable" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)">
        		<EasingDoubleKeyFrame KeyTime="00:00:00.0900000" Value="-90" />
        		<EasingDoubleKeyFrame KeyTime="00:00:00.7000000" Value="-60" />
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid VerticalAlignment="Center">
        <Grid.ColumnDefinitions>
        	<ColumnDefinition />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        
        <Button Content="Play Again" Width="120" Margin="0 0 10 0" HorizontalAlignment="Right" VerticalAlignment="Top" Click="Button_Click" />
        
        <Border x:Name="borderTable" Grid.Column="1" CornerRadius="2,2,2,2" Height="322" Width="322">
            <Border.Projection>
    		    <PlaneProjection RotationX="-60" GlobalOffsetY="-40" />
    	    </Border.Projection>
            <Border BorderBrush="#FF000000" BorderThickness="1,1,1,1">
                <Grid x:Name="checkersTable" />
            </Border>
        </Border>
    </Grid>
</UserControl>