You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
3.6 KiB
86 lines
3.6 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="Qwirkle.Pages.Gameboard"
|
|
xmlns:controls="clr-namespace:Qwirkle.Views"
|
|
Title="Gameboard"
|
|
x:Name="root">
|
|
<ScrollView>
|
|
|
|
<StackLayout>
|
|
|
|
<CollectionView ItemsSource="{Binding Board.ReadCells}"
|
|
HorizontalOptions="Center"
|
|
VerticalOptions="Center">
|
|
<CollectionView.ItemsLayout>
|
|
<GridItemsLayout Orientation="Vertical"
|
|
Span="{Binding Board.Columns}"/>
|
|
</CollectionView.ItemsLayout>
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border WidthRequest="70" HeightRequest="70"
|
|
BackgroundColor="WhiteSmoke"
|
|
Margin="0">
|
|
<Border.GestureRecognizers>
|
|
<DropGestureRecognizer DragOver="OnDragOver"
|
|
DropCommand="{Binding OnDrop, Source={x:Reference root}}"
|
|
DropCommandParameter="{Binding .}" />
|
|
</Border.GestureRecognizers>
|
|
<Label Text="{Binding Tile}" />
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
|
|
<CollectionView ItemsSource="{Binding PlayerList[0].Tiles}"
|
|
HorizontalOptions="Center"
|
|
VerticalOptions="Start" >
|
|
<CollectionView.ItemsLayout>
|
|
<GridItemsLayout Orientation="Horizontal"/>
|
|
</CollectionView.ItemsLayout>
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border WidthRequest="70" HeightRequest="70"
|
|
BackgroundColor="WhiteSmoke"
|
|
Margin="0">
|
|
<Label Text="{Binding}">
|
|
<Label.GestureRecognizers>
|
|
<DragGestureRecognizer />
|
|
</Label.GestureRecognizers>
|
|
</Label>
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
|
|
|
|
</CollectionView>
|
|
|
|
<CollectionView ItemsSource="{Binding PlayerList[1].Tiles}"
|
|
HorizontalOptions="End"
|
|
VerticalOptions="End" >
|
|
<CollectionView.ItemsLayout>
|
|
<GridItemsLayout Orientation="Vertical"/>
|
|
</CollectionView.ItemsLayout>
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border WidthRequest="70" HeightRequest="70"
|
|
BackgroundColor="WhiteSmoke"
|
|
Margin="0">
|
|
<Label Text="{Binding}">
|
|
<Label.GestureRecognizers>
|
|
<DragGestureRecognizer />
|
|
</Label.GestureRecognizers>
|
|
</Label>
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
|
|
|
|
</CollectionView>
|
|
|
|
|
|
</StackLayout>
|
|
|
|
</ScrollView>
|
|
</ContentPage>
|