<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="Qwirkle.Views.Scoreboard"
             xmlns:controls="clr-namespace:Qwirkle.Views"
             x:Name="root">


    <VerticalStackLayout MaximumWidthRequest="200" Background="Transparent">

        <CollectionView ItemsSource="{Binding ScoreboardList}" BindingContext="{x:Reference root}">
            <CollectionView.ItemsLayout>
                <GridItemsLayout Orientation="Vertical"/>
            </CollectionView.ItemsLayout>
            <CollectionView.ItemTemplate>
                <DataTemplate>
                    <StackLayout>
                        <Grid ColumnDefinitions="4*, auto, 2*"
                            RowDefinitions="50">

                            <Label
                            Grid.Column="0"
                            Text="{Binding Key}"
                            Style="{StaticResource ContentTab}"/>

                            <Rectangle
                            Style="{StaticResource RectangleTab}"
                            Grid.Column="1"/>

                            <Label
                            Grid.Column="2"
                            Text="{Binding Value}"
                            Style="{StaticResource ContentTab}"/>
                        </Grid>
                        <Rectangle/>
                    </StackLayout>
                </DataTemplate>
            </CollectionView.ItemTemplate>
        </CollectionView>

    </VerticalStackLayout>

</ContentView>
