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.
77 lines
3.2 KiB
77 lines
3.2 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"
|
|
xmlns:conv="clr-namespace:Dames.Converters"
|
|
x:Class="Dames.damier"
|
|
Title="damier">
|
|
|
|
<ContentPage.Resources>
|
|
<conv:Enum2StringConverter x:Key="enum2StringConverter"/>
|
|
<conv:Enum2ImageConverter x:Key="enum2ImageConverter"/>
|
|
</ContentPage.Resources>
|
|
|
|
<Grid>
|
|
<Image Source="bg.jpg" Aspect="AspectFill"/>
|
|
|
|
<Button Text="Retour"
|
|
BackgroundColor="Transparent"
|
|
TextColor="White"
|
|
HorizontalOptions="End"
|
|
Margin="0,30,20,0"
|
|
BorderWidth="2"
|
|
BorderColor="White"
|
|
WidthRequest="100"
|
|
MaximumWidthRequest="100"
|
|
MaximumHeightRequest="50"
|
|
VerticalOptions="Start"
|
|
Clicked="Button_ClickedRetour"
|
|
|
|
|
|
/>
|
|
<CollectionView ItemsSource="{Binding G.Partie.Plateau.ListeCases}"
|
|
BackgroundColor="White"
|
|
HorizontalOptions="Center"
|
|
VerticalOptions="Center">
|
|
<CollectionView.ItemsLayout>
|
|
<GridItemsLayout Orientation="Vertical"
|
|
Span="10"/>
|
|
</CollectionView.ItemsLayout>
|
|
<CollectionView.GestureRecognizers>
|
|
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
|
|
</CollectionView.GestureRecognizers>
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
|
|
<Border HeightRequest="60" WidthRequest="60"
|
|
BackgroundColor="{Binding CouleurCase,Converter={StaticResource enum2StringConverter}}">
|
|
<Image >
|
|
<Image.Triggers>
|
|
<DataTrigger TargetType="Image" Binding="{Binding Pion}" Value="true">
|
|
<Setter Property="Source" Value="{Binding Pion2.CouleurPion,Converter={StaticResource enum2ImageConverter}}"/>
|
|
</DataTrigger>
|
|
</Image.Triggers>
|
|
</Image>
|
|
</Border>
|
|
|
|
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
|
|
<BoxView BackgroundColor="Gray" HeightRequest="200" WidthRequest="220" HorizontalOptions="Start" VerticalOptions="Start"
|
|
Margin="20,50,100,20"
|
|
CornerRadius="30"/>
|
|
<Label Text="C'est au tour de" TextColor="{Binding G.Partie.JoueurCourrant.CouleurDePion,Converter={StaticResource enum2StringConverter}}"
|
|
VerticalOptions="Start" HorizontalOptions="Start" Margin="80,80" Scale="2"/>
|
|
<Label Text="{Binding G.Partie.JoueurCourrant.Nom}" TextColor="{Binding G.Partie.JoueurCourrant.CouleurDePion,Converter={StaticResource enum2StringConverter}}"
|
|
VerticalOptions="Start" HorizontalOptions="Start" Margin="60,120" Scale="2"/>
|
|
<Label Text="qui joue les " TextColor="{Binding G.Partie.JoueurCourrant.CouleurDePion,Converter={StaticResource enum2StringConverter}}"
|
|
VerticalOptions="Start" HorizontalOptions="Start" Margin="80,160" Scale="2"/>
|
|
<Label Text="{Binding G.Partie.JoueurCourrant.CouleurDePion}" TextColor="{Binding G.Partie.JoueurCourrant.CouleurDePion,Converter={StaticResource enum2StringConverter}}"
|
|
VerticalOptions="Start" HorizontalOptions="Start" Margin="70,200" Scale="2"/>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
</ContentPage> |