<Page
    x:Class="YJMPD_UWP.Views.ScoreView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:YJMPD_UWP.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <ScrollViewer>
        <Grid Style="{StaticResource BaseGrid}" >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <StackPanel Margin="0,10,0,0" Grid.Row="0">
                <TextBlock Text="Players" Style="{StaticResource Header}" />

                <TextBlock Text="{Binding PlayersCount}" />
            </StackPanel>

            <ListView x:Name="PlayersList" ItemsSource="{Binding Players}" SelectionMode="None" Grid.Row="1" IsTapEnabled="False">
                <ListView.ItemTemplate>
                    <DataTemplate x:Name="ListViewDataTemplate">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Username}" Margin="0,0,5,0" />
                            <TextBlock Text="{Binding Points}"  Margin="0,0,5,0" />
                            <TextBlock Text="{Binding PointsTotal}" />
                        </StackPanel>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>

            <StackPanel Grid.Row="2">
                <Button Style="{StaticResource Green}" Name="ReadyButton" Click="ReadyButton_Click">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Style="{StaticResource Icon}" Text="&#xE8FB;" Visibility="Collapsed" Name="ReadyCheck" Margin="0,0,10,0" />
                        <TextBlock Text="Ready" />
                    </StackPanel>
                </Button>
            </StackPanel>

        </Grid>
    </ScrollViewer>
</Page>
