-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
145 lines (124 loc) · 7.08 KB
/
MainPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?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:layouts="clr-namespace:Microsoft.Maui.Layouts;assembly=Microsoft.Maui"
xmlns:converters="clr-namespace:tictactroll.Converters"
x:Class="tictactroll.MainPage">
<ContentPage.Resources>
<layouts:FlexBasis x:Key="case_basis">33%</layouts:FlexBasis>
<Color x:Key="couleurDesBordures">Green</Color>
<Color x:Key="couleurDesCases">Black</Color>
<converters:ValeurDeCaseAImageConverter x:Key="convertisseurDeValeurAImage"/>
</ContentPage.Resources>
<FlexLayout Wrap="Wrap"
BackgroundColor="{StaticResource couleurDesBordures}">
<Frame FlexLayout.Basis="{StaticResource case_basis}"
BackgroundColor="{StaticResource couleurDesCases}"
BorderColor="{StaticResource couleurDesBordures}">
<Frame.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding PremiereCaseTouchee}"/>
</Frame.GestureRecognizers>
<Image VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Source="{Binding PremiereCaseValeur, Converter={StaticResource convertisseurDeValeurAImage}}"
Aspect="AspectFit"/>
</Frame>
<Frame FlexLayout.Basis="{StaticResource case_basis}"
BorderColor="{StaticResource couleurDesBordures}"
BackgroundColor="{StaticResource couleurDesCases}">
<Frame.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding DeuxiemeCaseTouchee}"/>
</Frame.GestureRecognizers>
<Image VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Source="{Binding DeuxiemeCaseValeur, Converter={StaticResource convertisseurDeValeurAImage}}"
Aspect="AspectFit"/>
</Frame>
<Frame FlexLayout.Basis="{StaticResource case_basis}"
BorderColor="{StaticResource couleurDesBordures}"
BackgroundColor="{StaticResource couleurDesCases}">
<Frame.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding TroisiemeCaseTouchee}"/>
</Frame.GestureRecognizers>
<Image VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Source="{Binding TroisiemeCaseValeur, Converter={StaticResource convertisseurDeValeurAImage}}"
Aspect="AspectFit"/>
</Frame>
<Frame FlexLayout.Basis="{StaticResource case_basis}"
BorderColor="{StaticResource couleurDesBordures}"
BackgroundColor="{StaticResource couleurDesCases}">
<Frame.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding QuatriemeCaseTouchee}"/>
</Frame.GestureRecognizers>
<Image VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Source="{Binding QuatriemeCaseValeur, Converter={StaticResource convertisseurDeValeurAImage}}"
Aspect="AspectFit"/>
</Frame>
<Frame FlexLayout.Basis="{StaticResource case_basis}"
BorderColor="{StaticResource couleurDesBordures}"
BackgroundColor="{StaticResource couleurDesCases}">
<Frame.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding CinquiemeCaseTouchee}"/>
</Frame.GestureRecognizers>
<Image VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Source="{Binding CinquiemeCaseValeur, Converter={StaticResource convertisseurDeValeurAImage}}"
Aspect="AspectFit"/>
</Frame>
<Frame FlexLayout.Basis="{StaticResource case_basis}"
BorderColor="{StaticResource couleurDesBordures}"
BackgroundColor="{StaticResource couleurDesCases}">
<Frame.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding SixiemeCaseTouchee}"/>
</Frame.GestureRecognizers>
<Image VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Source="{Binding SixiemeCaseValeur, Converter={StaticResource convertisseurDeValeurAImage}}"
Aspect="AspectFit"/>
</Frame>
<Frame FlexLayout.Basis="{StaticResource case_basis}"
BorderColor="{StaticResource couleurDesBordures}"
BackgroundColor="{StaticResource couleurDesCases}">
<Frame.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding SeptiemeCaseTouchee}"/>
</Frame.GestureRecognizers>
<Image VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Source="{Binding SeptiemeCaseValeur, Converter={StaticResource convertisseurDeValeurAImage}}"
Aspect="AspectFit"/>
</Frame>
<Frame FlexLayout.Basis="{StaticResource case_basis}"
BorderColor="{StaticResource couleurDesBordures}"
BackgroundColor="Black">
<Frame.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding HuitiemeCaseTouchee}"/>
</Frame.GestureRecognizers>
<Image VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Source="{Binding HuitiemeCaseValeur, Converter={StaticResource convertisseurDeValeurAImage}}"
Aspect="AspectFit"/>
</Frame>
<Frame FlexLayout.Basis="{StaticResource case_basis}"
BorderColor="{StaticResource couleurDesBordures}"
BackgroundColor="{StaticResource couleurDesCases}">
<Frame.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Command="{Binding NeuviemeCaseTouchee}"/>
</Frame.GestureRecognizers>
<Image VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Source="{Binding NeuviemeCaseValeur, Converter={StaticResource convertisseurDeValeurAImage}}"
Aspect="AspectFit"/>
</Frame>
</FlexLayout>
</ContentPage>