1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
- <ContentPage xmlns =" http://xamarin.com/schemas/2014/forms" xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml" xmlns : local =" clr-namespace:BugSweeper;assembly=BugSweeper" x : Class =" BugSweeper.BugSweeperPage" Title =" BugSweeper" >
3
- <ContentPage .Padding>
4
- <OnPlatform x : TypeArguments =" Thickness" iOS =" 0, 20, 0, 0" Android =" 0, 0, 0, 0" WinPhone =" 0, 0, 0, 0" />
5
- </ContentPage .Padding>
6
- <ContentView SizeChanged =" OnMainContentViewSizeChanged" >
7
- <Grid x : Name =" mainGrid" >
8
- <Grid .RowDefinitions>
9
- <RowDefinition Height =" 7*" />
10
- <RowDefinition Height =" 4*" />
11
- </Grid .RowDefinitions>
12
- <Grid .ColumnDefinitions>
13
- <ColumnDefinition Width =" 0" />
14
- <ColumnDefinition Width =" *" />
15
- </Grid .ColumnDefinitions>
16
- <StackLayout x : Name =" textStack" Grid.Row=" 0" Grid.Column=" 1" Spacing =" 0" >
17
- <StackLayout HorizontalOptions =" Center" Spacing =" 0" >
18
- <Label Text =" BugSweeper" Font =" Bold, Large" TextColor =" Accent" />
19
- <BoxView Color =" Accent" HeightRequest =" 3" />
20
- </StackLayout >
21
- <Label Text =" Tap to flag/unflag a potential bug." VerticalOptions =" CenterAndExpand" HorizontalTextAlignment =" Center" />
22
- <Label Text =" Double-tap if you're sure it's not a bug.
 The first double-tap is always safe!" VerticalOptions =" CenterAndExpand" HorizontalTextAlignment =" Center" />
23
- <StackLayout Orientation =" Horizontal" Spacing =" 0" VerticalOptions =" CenterAndExpand" HorizontalOptions =" Center" >
24
- <Label BindingContext =" {x:Reference board}" Text =" {Binding FlaggedTileCount, StringFormat='Flagged {0} '}" />
25
- <Label BindingContext =" {x:Reference board}" Text =" {Binding BugCount, StringFormat=' out of {0} bugs.'}" />
26
- </StackLayout >
27
- <!-- Make this a binding??? -->
28
- <Label x : Name =" timeLabel" Text =" 0:00" VerticalOptions =" CenterAndExpand" HorizontalTextAlignment =" Center" />
29
- </StackLayout >
30
- <ContentView Grid.Row=" 1" Grid.Column=" 1" SizeChanged =" OnBoardContentViewSizeChanged" >
31
- <!-- Single-cell Grid for Board and overlays. -->
32
- <Grid >
33
- <Grid .RowDefinitions>
34
- <RowDefinition Height =" *" />
35
- </Grid .RowDefinitions>
36
- <Grid .ColumnDefinitions>
37
- <ColumnDefinition Width =" *" />
38
- </Grid .ColumnDefinitions>
39
- <local : Board x : Name =" board" />
40
- <StackLayout x : Name =" congratulationsText" Orientation =" Horizontal" HorizontalOptions =" Center" VerticalOptions =" Center" Spacing =" 0" >
41
- <Label Text =" C" TextColor =" Red" />
42
- <Label Text =" O" TextColor =" Red" />
43
- <Label Text =" N" TextColor =" Red" />
44
- <Label Text =" G" TextColor =" Red" />
45
- <Label Text =" R" TextColor =" Red" />
46
- <Label Text =" A" TextColor =" Red" />
47
- <Label Text =" T" TextColor =" Red" />
48
- <Label Text =" U" TextColor =" Red" />
49
- <Label Text =" L" TextColor =" Red" />
50
- <Label Text =" A" TextColor =" Red" />
51
- <Label Text =" T" TextColor =" Red" />
52
- <Label Text =" I" TextColor =" Red" />
53
- <Label Text =" O" TextColor =" Red" />
54
- <Label Text =" N" TextColor =" Red" />
55
- <Label Text =" S" TextColor =" Red" />
56
- <Label Text =" !" TextColor =" Red" />
57
- </StackLayout >
58
- <StackLayout x : Name =" consolationText" Orientation =" Horizontal" Spacing =" 0" HorizontalOptions =" Center" VerticalOptions =" Center" >
59
- <Label Text =" T" TextColor =" Red" />
60
- <Label Text =" O" TextColor =" Red" />
61
- <Label Text =" O" TextColor =" Red" />
62
- <Label Text =" " TextColor =" Red" />
63
- <Label Text =" B" TextColor =" Red" />
64
- <Label Text =" A" TextColor =" Red" />
65
- <Label Text =" D" TextColor =" Red" />
66
- <Label Text =" !" TextColor =" Red" />
67
- </StackLayout >
68
- <Button x : Name =" playAgainButton" Text =" Play Another Game" HorizontalOptions =" Center" VerticalOptions =" Center" Clicked =" OnplayAgainButtonClicked" >
69
- <Button .BackgroundColor>
70
- <OnPlatform x : TypeArguments =" Color" iOS =" #C0FFFFFF" Android =" Default" WinPhone =" #C0808080" />
71
- </Button .BackgroundColor>
72
- </Button >
73
- </Grid >
74
- </ContentView >
75
- </Grid >
76
- </ContentView >
2
+ <ContentPage xmlns =" http://xamarin.com/schemas/2014/forms"
3
+ xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
+ xmlns : local =" clr-namespace:BugSweeper;assembly=BugSweeper"
5
+ x : Class =" BugSweeper.BugSweeperPage"
6
+ Title =" BugSweeper" >
7
+ <ContentPage .Padding>
8
+ <OnPlatform x : TypeArguments =" Thickness" iOS =" 0, 20, 0, 0" Android =" 0, 0, 0, 0" WinPhone =" 0, 0, 0, 0" />
9
+ </ContentPage .Padding>
10
+ <ContentView SizeChanged =" OnMainContentViewSizeChanged" >
11
+ <Grid x : Name =" mainGrid" ColumnSpacing =" 0" RowSpacing =" 0" >
12
+ <Grid .RowDefinitions>
13
+ <RowDefinition Height =" 7*" />
14
+ <RowDefinition Height =" 4*" />
15
+ </Grid .RowDefinitions>
16
+ <Grid .ColumnDefinitions>
17
+ <ColumnDefinition Width =" 0" />
18
+ <ColumnDefinition Width =" *" />
19
+ </Grid .ColumnDefinitions>
20
+ <StackLayout x : Name =" textStack" Grid.Row=" 0" Grid.Column=" 1" Spacing =" 0" >
21
+ <StackLayout HorizontalOptions =" Center" Spacing =" 0" >
22
+ <Label Text =" BugSweeper" Font =" Bold, Large" TextColor =" Accent" />
23
+ <BoxView Color =" Accent" HeightRequest =" 3" />
24
+ </StackLayout >
25
+ <Label Text =" Tap to flag/unflag a potential bug." VerticalOptions =" CenterAndExpand" HorizontalTextAlignment =" Center" />
26
+ <Label Text =" Double-tap if you're sure it's not a bug.
 The first double-tap is always safe!" VerticalOptions =" CenterAndExpand" HorizontalTextAlignment =" Center" />
27
+ <StackLayout Orientation =" Horizontal" Spacing =" 0" VerticalOptions =" CenterAndExpand" HorizontalOptions =" Center" >
28
+ <Label BindingContext =" {x:Reference board}" Text =" {Binding FlaggedTileCount, StringFormat='Flagged {0} '}" />
29
+ <Label BindingContext =" {x:Reference board}" Text =" {Binding BugCount, StringFormat=' out of {0} bugs.'}" />
30
+ </StackLayout >
31
+ <!-- Make this a binding??? -->
32
+ <Label x : Name =" timeLabel" Text =" 0:00" VerticalOptions =" CenterAndExpand" HorizontalTextAlignment =" Center" />
33
+ </StackLayout >
34
+ <ContentView Grid.Row=" 1" Grid.Column=" 1" SizeChanged =" OnBoardContentViewSizeChanged" >
35
+ <!-- Single-cell Grid for Board and overlays. -->
36
+ <Grid >
37
+ <Grid .RowDefinitions>
38
+ <RowDefinition Height =" *" />
39
+ </Grid .RowDefinitions>
40
+ <Grid .ColumnDefinitions>
41
+ <ColumnDefinition Width =" *" />
42
+ </Grid .ColumnDefinitions>
43
+ <local : Board x : Name =" board" />
44
+ <StackLayout x : Name =" congratulationsText" Orientation =" Horizontal" HorizontalOptions =" Center" VerticalOptions =" Center" Spacing =" 0" >
45
+ <Label Text =" C" TextColor =" Red" />
46
+ <Label Text =" O" TextColor =" Red" />
47
+ <Label Text =" N" TextColor =" Red" />
48
+ <Label Text =" G" TextColor =" Red" />
49
+ <Label Text =" R" TextColor =" Red" />
50
+ <Label Text =" A" TextColor =" Red" />
51
+ <Label Text =" T" TextColor =" Red" />
52
+ <Label Text =" U" TextColor =" Red" />
53
+ <Label Text =" L" TextColor =" Red" />
54
+ <Label Text =" A" TextColor =" Red" />
55
+ <Label Text =" T" TextColor =" Red" />
56
+ <Label Text =" I" TextColor =" Red" />
57
+ <Label Text =" O" TextColor =" Red" />
58
+ <Label Text =" N" TextColor =" Red" />
59
+ <Label Text =" S" TextColor =" Red" />
60
+ <Label Text =" !" TextColor =" Red" />
61
+ </StackLayout >
62
+ <StackLayout x : Name =" consolationText" Orientation =" Horizontal" Spacing =" 0" HorizontalOptions =" Center" VerticalOptions =" Center" >
63
+ <Label Text =" T" TextColor =" Red" />
64
+ <Label Text =" O" TextColor =" Red" />
65
+ <Label Text =" O" TextColor =" Red" />
66
+ <Label Text =" " TextColor =" Red" />
67
+ <Label Text =" B" TextColor =" Red" />
68
+ <Label Text =" A" TextColor =" Red" />
69
+ <Label Text =" D" TextColor =" Red" />
70
+ <Label Text =" !" TextColor =" Red" />
71
+ </StackLayout >
72
+ <Button x : Name =" playAgainButton" Text =" Play Another Game? " HorizontalOptions =" Center" VerticalOptions =" Center" Clicked =" OnplayAgainButtonClicked"
73
+ BorderColor =" Black" BorderWidth =" 2" BackgroundColor =" White" TextColor =" Black" />
74
+ </Grid >
75
+ </ContentView >
76
+ </Grid >
77
+ </ContentView >
77
78
</ContentPage >
0 commit comments