1
1
< ScrollView orientation ="vertical ">
2
2
< StackLayout id ="main ">
3
3
< Label text ="Absolute Layout " class ="title "> </ Label >
4
-
5
- <!-- >> absolute-layout -->
4
+
5
+ <!-- >> absolute-layout -->
6
6
< AbsoluteLayout width ="210 " height ="210 " backgroundColor ="lightgray ">
7
7
< Label text ="10, 10 " left ="10 " top ="10 " width ="90 " height ="90 " backgroundColor ="red "> </ Label >
8
8
< Label text ="110, 10 " left ="110 " top ="10 " width ="90 " height ="90 " backgroundColor ="green "> </ Label >
11
11
</ AbsoluteLayout >
12
12
<!-- << absolute-layout -->
13
13
14
- <!-- >> absolute-layout-margin -->
14
+ <!-- >> absolute-layout-margin -->
15
15
< AbsoluteLayout width ="210 " height ="210 " backgroundColor ="lightgray ">
16
16
< Label text ="no margin " left ="10 " top ="10 " width ="100 " height ="100 " backgroundColor ="red "> </ Label >
17
17
< Label text ="margin=`30` " left ="10 " top ="10 " margin ="30 " width ="100 " height ="90 " backgroundColor ="green "> </ Label >
18
18
</ AbsoluteLayout >
19
19
<!-- << absolute-layout-margin -->
20
-
20
+
21
21
< Label text ="Dock Layout " class ="title "> </ Label >
22
-
23
- <!-- >> dock-layout -->
22
+
23
+ <!-- >> dock-layout -->
24
24
< DockLayout width ="210 " height ="210 " backgroundColor ="lightgray " stretchLastChild ="false ">
25
25
< Label text ="left " dock ="left " width ="60 " backgroundColor ="red "> </ Label >
26
26
< Label text ="top " dock ="top " height ="60 " backgroundColor ="green "> </ Label >
27
27
< Label text ="right " dock ="right " width ="60 " backgroundColor ="blue "> </ Label >
28
28
< Label text ="bottom " dock ="bottom " height ="60 " backgroundColor ="yellow "> </ Label >
29
29
</ DockLayout >
30
30
<!-- << dock-layout -->
31
-
31
+
32
32
<!-- >> dock-layout-stretch-last -->
33
33
< DockLayout width ="210 " height ="210 " backgroundColor ="lightgray " stretchLastChild ="true ">
34
34
< Label text ="left " dock ="left " backgroundColor ="red "> </ Label >
37
37
< Label text ="bottom " dock ="bottom " backgroundColor ="yellow "> </ Label >
38
38
</ DockLayout >
39
39
<!-- << dock-layout-stretch-last -->
40
-
40
+
41
41
<!-- >> dock-layout-one-side -->
42
42
< DockLayout width ="210 " height ="210 " backgroundColor ="lightgray " stretchLastChild ="true ">
43
43
< Label text ="left1 " dock ="left " backgroundColor ="red "> </ Label >
46
46
< Label text ="last child " backgroundColor ="yellow "> </ Label >
47
47
</ DockLayout >
48
48
<!-- << dock-layout-one-side -->
49
-
49
+
50
50
< Label text ="Grid Layout " class ="title "> </ Label >
51
-
52
- <!-- >> grid-layout-sample -->
53
- < GridLayout columns ="50, auto, * " rows ="50, auto, * " width ="210 " height ="210 " backgroundColor ="lightgray " >
51
+
52
+ <!-- >> grid-layout-sample -->
53
+ < GridLayout columns ="50, auto, * " rows ="50, auto, * " width ="210 " height ="210 " backgroundColor ="lightgray ">
54
54
< Label text ="Label 1 " row ="0 " col ="0 " backgroundColor ="red "> </ Label >
55
55
< Label text ="Label 2 " row ="0 " col ="1 " colSpan ="2 " backgroundColor ="green "> </ Label >
56
56
< Label text ="Label 3 " row ="1 " col ="0 " rowSpan ="2 " backgroundColor ="blue "> </ Label >
60
60
< Label text ="Label 7 " row ="2 " col ="2 " backgroundColor ="purple "> </ Label >
61
61
</ GridLayout >
62
62
<!-- << grid-layout-sample -->
63
-
64
- <!-- >> grid-layout-star -->
65
- < GridLayout columns ="*,2* " rows ="2*,3* " width ="300 " height ="300 " backgroundColor ="lightgray " >
63
+
64
+ <!-- >> grid-layout-star -->
65
+ < GridLayout columns ="*,2* " rows ="2*,3* " width ="300 " height ="300 " backgroundColor ="lightgray ">
66
66
< Label text ="Label 1 " col ="0 " row ="0 " backgroundColor ="red "> </ Label >
67
67
< Label text ="Label 2 " col ="1 " row ="0 " backgroundColor ="green "> </ Label >
68
68
< Label text ="Label 3 " col ="0 " row ="1 " backgroundColor ="blue "> </ Label >
69
69
< Label text ="Label 4 " col ="1 " row ="1 " backgroundColor ="yellow "> </ Label >
70
70
</ GridLayout >
71
71
<!-- << grid-layout-star -->
72
-
73
- <!-- >> grid-layout-fexed-auto -->
74
- < GridLayout columns ="100,auto " rows ="100,auto " width ="210 " height ="210 " backgroundColor ="lightgray " >
72
+
73
+ <!-- >> grid-layout-fexed-auto -->
74
+ < GridLayout columns ="100,auto " rows ="100,auto " width ="210 " height ="210 " backgroundColor ="lightgray ">
75
75
< Label text ="Label 1 " col ="0 " row ="0 " backgroundColor ="red "> </ Label >
76
76
< Label text ="Label 2 " col ="1 " row ="0 " backgroundColor ="green "> </ Label >
77
77
< Label text ="Label 3 " col ="0 " row ="1 " backgroundColor ="blue "> </ Label >
78
78
< Label text ="Label 4 " col ="1 " row ="1 " backgroundColor ="yellow "> </ Label >
79
79
</ GridLayout >
80
80
<!-- << grid-layout-fexed-auto -->
81
-
82
- <!-- >> grid-layout-no-width -->
81
+
82
+ <!-- >> grid-layout-no-width -->
83
83
< StackLayout width ="200 " height ="200 " backgroundColor ="palegreen ">
84
- < GridLayout columns ="*,2* " horizontalAlignment ="left " verticalAlignment ="top " backgroundColor ="lightgray " >
84
+ < GridLayout columns ="*,2* " horizontalAlignment ="left " verticalAlignment ="top " backgroundColor ="lightgray ">
85
85
< Label text ="Label 1 " col ="0 " backgroundColor ="red "> </ Label >
86
86
< Label text ="Label 2 " col ="1 " backgroundColor ="green "> </ Label >
87
87
</ GridLayout >
88
88
</ StackLayout >
89
89
<!-- << grid-layout-no-width -->
90
-
90
+
91
91
<!-- >> grid-layout-column-stretch -->
92
- < GridLayout columns ="auto,100 " rows ="auto,auto " width ="300 " height ="300 " backgroundColor ="lightgray " >
92
+ < GridLayout columns ="auto,100 " rows ="auto,auto " width ="300 " height ="300 " backgroundColor ="lightgray ">
93
93
< Label text ="Label 1 " col ="0 " row ="0 " backgroundColor ="red "> </ Label >
94
94
< Label text ="Label 2 " col ="1 " row ="0 " backgroundColor ="green "> </ Label >
95
95
< Label text ="Label 3 " width ="150 " col ="0 " row ="1 " backgroundColor ="blue "> </ Label >
96
96
</ GridLayout >
97
97
<!-- << grid-layout-column-stretch -->
98
-
99
- <!-- >> grid-layout-complex -->
98
+
99
+ <!-- >> grid-layout-complex -->
100
100
< GridLayout columns ="auto, *, auto " rows ="auto, 25 " verticalAlignment ="top " backgroundColor ="lightgray ">
101
101
< Image src ="~/cute.jpg " rowSpan ="2 " width ="72 " height ="72 " margin ="3 " verticalAlignment ="top "> </ Image >
102
102
< Label text ="My cat loves the camera " textWrap ="true " col ="1 " colSpan ="2 " minHeight ="50 " fontSize ="20 " margin ="3 "> </ Label >
103
103
< Label text ="John Smith " col ="1 " row ="1 " fontSize ="14 " horizontalAlignment ="left " verticalAlignment ="bottom " margin ="3 "> </ Label >
104
104
< Label text ="comments: 26 " col ="2 " row ="1 " color ="#10C2B0 " fontSize ="14 " verticalAlignment ="bottom " margin ="3 "> </ Label >
105
105
</ GridLayout >
106
106
<!-- << grid-layout-complex -->
107
-
107
+
108
108
< Label text ="Stack Layout " class ="title "> </ Label >
109
-
109
+
110
110
<!-- >> stack-layout-vertical -->
111
111
< StackLayout orientation ="vertical " width ="210 " height ="210 " backgroundColor ="lightgray ">
112
112
< Label text ="Label 1 " width ="50 " height ="50 " backgroundColor ="red "> </ Label >
115
115
< Label text ="Label 4 " width ="50 " height ="50 " backgroundColor ="yellow "> </ Label >
116
116
</ StackLayout >
117
117
<!-- << stack-layout-vertical -->
118
-
118
+
119
119
<!-- >> stack-layout-horizontal -->
120
120
< StackLayout orientation ="vertical " width ="210 " height ="210 " backgroundColor ="lightgray ">
121
121
< Label text ="Label 1 " width ="50 " height ="50 " backgroundColor ="red "> </ Label >
122
122
< Label text ="Label 2 " width ="50 " height ="50 " backgroundColor ="green "> </ Label >
123
123
< Label text ="Label 3 " width ="50 " height ="50 " backgroundColor ="blue "> </ Label >
124
124
< Label text ="Label 4 " width ="50 " height ="50 " backgroundColor ="yellow "> </ Label >
125
- </ StackLayout >
125
+ </ StackLayout >
126
126
<!-- << stack-layout-horizontal -->
127
-
128
- <!-- >> stack-layout-vertical-align -->
127
+
128
+ <!-- >> stack-layout-vertical-align -->
129
129
< StackLayout orientation ="vertical " width ="210 " height ="210 " backgroundColor ="lightgray ">
130
130
< Label text ="Label 1 " horizontalAlignment ="left " backgroundColor ="red "> </ Label >
131
131
< Label text ="Label 2 " horizontalAlignment ="center " backgroundColor ="green "> </ Label >
132
132
< Label text ="Label 3 " horizontalAlignment ="right " backgroundColor ="blue "> </ Label >
133
133
< Label text ="Label 4 " horizontalAlignment ="stretch " backgroundColor ="yellow "> </ Label >
134
134
</ StackLayout >
135
135
<!-- << stack-layout-vertical-align -->
136
-
136
+
137
137
<!-- >> stack-layout-horizontal-align -->
138
- < StackLayout orientation ="horizontal " width ="210 " height ="210 " backgroundColor ="lightgray ">
138
+ < StackLayout orientation ="horizontal " width ="210 " height ="210 " backgroundColor ="lightgray ">
139
139
< Label text ="Label 1 " verticalAlignment ="top " backgroundColor ="red "> </ Label >
140
140
< Label text ="Label 2 " verticalAlignment ="center " backgroundColor ="green "> </ Label >
141
141
< Label text ="Label 3 " verticalAlignment ="bottom " backgroundColor ="blue "> </ Label >
142
142
< Label text ="Label 4 " verticalAlignment ="stretch " backgroundColor ="yellow "> </ Label >
143
- </ StackLayout >
143
+ </ StackLayout >
144
144
<!-- << stack-layout-horizontal-align -->
145
-
145
+
146
146
< Label text ="Wrap Layout " class ="title "> </ Label >
147
-
148
- <!-- >> wrap-layout-horizontal -->
147
+
148
+ <!-- >> wrap-layout-horizontal -->
149
149
< WrapLayout orientation ="horizontal " width ="210 " height ="210 " backgroundColor ="lightgray ">
150
150
< Label text ="Label 1 " width ="70 " height ="70 " backgroundColor ="red "> </ Label >
151
151
< Label text ="Label 2 " width ="70 " height ="70 " backgroundColor ="green "> </ Label >
152
152
< Label text ="Label 3 " width ="70 " height ="70 " backgroundColor ="blue "> </ Label >
153
153
< Label text ="Label 4 " width ="70 " height ="70 " backgroundColor ="yellow "> </ Label >
154
154
</ WrapLayout >
155
155
<!-- << wrap-layout-horizontal -->
156
-
156
+
157
157
<!-- >> wrap-layout-vertical -->
158
158
< WrapLayout orientation ="vertical " width ="210 " height ="210 " backgroundColor ="lightgray ">
159
159
< Label text ="Label 1 " width ="70 " height ="70 " backgroundColor ="red "> </ Label >
162
162
< Label text ="Label 4 " width ="70 " height ="70 " backgroundColor ="yellow "> </ Label >
163
163
</ WrapLayout >
164
164
<!-- << wrap-layout-vertical -->
165
-
165
+
166
166
<!-- >> wrap-layout-item -->
167
167
< WrapLayout itemWidth ="30 " itemHeight ="30 " width ="210 " height ="210 " backgroundColor ="lightgray ">
168
168
< Label text ="Label 1 " width ="70 " height ="70 " backgroundColor ="red "> </ Label >
171
171
< Label text ="Label 4 " width ="70 " height ="70 " backgroundColor ="yellow "> </ Label >
172
172
</ WrapLayout >
173
173
<!-- << wrap-layout-item -->
174
+
175
+ < Label text ="Flexbox Layout " class ="title "> </ Label >
176
+
177
+ <!-- >> flexbox-layout-flexdirection-row -->
178
+ < FlexboxLayout width ="300 " height ="300 " backgroundColor ="lightgray ">
179
+ < Label text ="Label 1 " width ="70 " height ="70 " backgroundColor ="red " />
180
+ < Label text ="Label 2 " width ="70 " height ="70 " backgroundColor ="green " />
181
+ < Label text ="Label 3 " width ="70 " height ="70 " backgroundColor ="blue " />
182
+ < Label text ="Label 4 " width ="70 " height ="70 " backgroundColor ="yellow " />
183
+ </ FlexboxLayout >
184
+ <!-- << flexbox-layout-flexdirection-row -->
185
+
186
+ <!-- >> flexbox-layout-flexdirection-column -->
187
+ < FlexboxLayout flexDirection ="column " width ="300 " height ="300 " backgroundColor ="lightgray ">
188
+ < Label text ="Label 1 " width ="70 " height ="70 " backgroundColor ="red " />
189
+ < Label text ="Label 2 " width ="70 " height ="70 " backgroundColor ="green " />
190
+ < Label text ="Label 3 " width ="70 " height ="70 " backgroundColor ="blue " />
191
+ < Label text ="Label 4 " width ="70 " height ="70 " backgroundColor ="yellow " />
192
+ </ FlexboxLayout >
193
+ <!-- << flexbox-layout-flexdirection-column -->
194
+
195
+ <!-- >> flexbox-layout-alignItems-flex-start -->
196
+ < FlexboxLayout alignItems ="flex-start " width ="300 " height ="300 " backgroundColor ="lightgray ">
197
+ < Label text ="Label 1 " width ="70 " height ="70 " backgroundColor ="red " />
198
+ < Label text ="Label 2 " width ="70 " height ="70 " backgroundColor ="green " />
199
+ < Label text ="Label 3 " width ="70 " height ="70 " backgroundColor ="blue " />
200
+ < Label text ="Label 4 " width ="70 " height ="70 " backgroundColor ="yellow " />
201
+ </ FlexboxLayout >
202
+ <!-- << flexbox-layout-alignItems-flex-start -->
203
+
204
+ <!-- >> flexbox-layout-order -->
205
+ < FlexboxLayout alignItems ="flex-start " width ="300 " height ="300 " backgroundColor ="lightgray ">
206
+ < Label order ="3 " text ="Label 1 " width ="70 " height ="70 " backgroundColor ="red " />
207
+ < Label order ="4 " text ="Label 2 " width ="70 " height ="70 " backgroundColor ="green " />
208
+ < Label order ="2 " text ="Label 3 " width ="70 " height ="70 " backgroundColor ="blue " />
209
+ < Label order ="1 " text ="Label 4 " width ="70 " height ="70 " backgroundColor ="yellow " />
210
+ </ FlexboxLayout >
211
+ <!-- << flexbox-layout-order -->
212
+
213
+ <!-- >> flexbox-layout-flexWrap -->
214
+ < FlexboxLayout flexWrap ="wrap " height ="300 " width ="300 " backgroundColor ="lightgray ">
215
+ < Label text ="Label 1 " width ="100 " height ="50 " backgroundColor ="red " />
216
+ < Label text ="Label 2 " width ="100 " height ="50 " backgroundColor ="green " />
217
+ < Label text ="Label 3 " width ="100 " height ="50 " backgroundColor ="blue " />
218
+ < Label text ="Label 4 " width ="100 " height ="50 " backgroundColor ="yellow " />
219
+ </ FlexboxLayout >
220
+ <!-- << flexbox-layout-flexWrap -->
221
+
222
+ <!-- >> flexbox-layout-alignSelf -->
223
+ < FlexboxLayout flexDirection ="column-reverse " justifyContent ="space-around " alignItems ="stretch " height ="300 " width ="300 "
224
+ backgroundColor ="lightgray ">
225
+ < Label text ="Label 1 " width ="50 " height ="50 " backgroundColor ="red " />
226
+ < Label alignSelf ="center " text ="Label 2 " width ="50 " height ="50 " backgroundColor ="green " />
227
+ < Label alignSelf ="flex-end " text ="Label 3 " width ="50 " height ="50 " backgroundColor ="blue " />
228
+ < Label text ="Label 4 " width ="50 " height ="50 " backgroundColor ="yellow " />
229
+ </ FlexboxLayout >
230
+ <!-- << flexbox-layout-alignSelf -->
174
231
</ StackLayout >
175
- </ ScrollView >
232
+ </ ScrollView >
0 commit comments