<UserControl x:Class="BeeAttack.View.BeeAttackGameControl"
    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"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480"
             xmlns:view="clr-namespace:BeeAttack.View"
             ManipulationDelta="UserControl_ManipulationDelta"
             >

    <Grid x:Name="LayoutRoot" Background="SkyBlue">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="10*"/>
            <RowDefinition Height="2*"/>
        </Grid.RowDefinitions>

        <Image x:Name="hive"
            Source="/Assets/Hive (outside).png" 
            HorizontalAlignment="Left"
            Margin="{Binding HiveMargin}"/>

        <ItemsControl Grid.Row="1" x:Name="playArea">
            <ItemsControl ItemsSource="{Binding BeeControls}">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <Canvas/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </ItemsControl>

        <TextBlock Grid.Row="1" Foreground="Black" VerticalAlignment="Top">
        <Run>Możesz przegapić jeszcze: </Run>
        <Run Text="{Binding MissesLeft}"/>
        <Run> pszczół</Run>
        </TextBlock>

        <TextBlock Grid.Row="1" Foreground="Black" VerticalAlignment="Top" 
                HorizontalAlignment="Right" Text="{Binding Score}" 
                Style="{StaticResource PanoramaItemHeaderTextStyle}"/>

        <Image x:Name="flower" 
            Source="/Assets/Flower.png" 
            Grid.Row="2" 
            HorizontalAlignment="Left"
            Margin="{Binding FlowerMargin}"/>

        <StackPanel Grid.Row="1" VerticalAlignment="Center" 
                HorizontalAlignment="Center" Visibility="{Binding GameOver}">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <TextBlock Foreground="Yellow" 
                        Style="{StaticResource JumpListAlphabetSmallStyle}">Atak</TextBlock>
                <view:BeeControl Width="75" Height="75"/>
                <TextBlock Foreground="Black"  
                        Style="{StaticResource JumpListAlphabetSmallStyle}">pszczół</TextBlock>
            </StackPanel>

            <Button Click="Button_Click">Rozpocznij nową grę</Button>

        </StackPanel>
    </Grid>
</UserControl>