Skip to content

Commit 03cd738

Browse files
author
eriklimakc
committed
docs: Adjustments in tabs
1 parent c74ac39 commit 03cd738

File tree

2 files changed

+55
-57
lines changed

2 files changed

+55
-57
lines changed

doc/controls/NavigationBar.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ new NavigationBar()
417417
.Content("Title")
418418
.MainCommand(
419419
new AppBarButton()
420-
.Label("BackButtonTitle)
420+
.Label("BackButtonTitle")
421421
)
422422
```
423423
***

doc/controls/SafeArea.md

+54-56
Original file line numberDiff line numberDiff line change
@@ -224,69 +224,68 @@ public MainPage()
224224
#### [**Padding (default)**](#tab/padding)
225225

226226
Top TabBar:
227-
# [**XAML**](#tab/xaml)
227+
**XAML**
228228
```diff
229229
<utu:TabBar Background="Purple"
230230
+ utu:SafeArea.Insets="Top">
231231
```
232-
# [**C#**](#tab/csharp)
232+
**C#**
233233
```diff
234234
new TabBar()
235235
.Background(Colors.Purple)
236236
+ .SafeArea(SafeArea.InsetMask.Top)
237237
```
238-
***
238+
239239
Bottom TabBar:
240-
# [**XAML**](#tab/xaml)
240+
**XAML**
241241
```diff
242242
<utu:TabBar Grid.Row="2"
243243
+ utu:SafeArea.Insets="Bottom"
244244
Background="Purple">
245245
```
246-
# [**C#**](#tab/csharp)
246+
**C#**
247247
```diff
248248
new TabBar()
249249
.Grid(row: 2)
250250
+ .SafeArea(SafeArea.InsetMask.Bottom)
251251
.Background(Colors.Purple)
252252
```
253-
***
253+
254254

255255
![safearea_with_padding_alpha](../assets/safearea_with_padding.png)
256256

257257
#### [**Margin**](#tab/margin)
258258

259259
Top TabBar:
260-
# [**XAML**](#tab/xaml)
260+
**XAML**
261261
```diff
262262
<utu:TabBar Background="Purple"
263263
+ utu:SafeArea.Insets="Top"
264264
+ utu:SafeArea.Mode="Margin">
265265
```
266-
# [**C#**](#tab/csharp)
266+
**C#**
267267
```diff
268268
new TabBar()
269269
.Background(Colors.Purple)
270270
+ .SafeArea(SafeArea.InsetMask.Top, SafeArea.InsetMode.Margin)
271271
```
272-
***
273272

274273
Bottom TabBar:
275-
# [**XAML**](#tab/xaml)
274+
**XAML**
276275
```diff
277276
<utu:TabBar Grid.Row="2"
278277
+ utu:SafeArea.Insets="Bottom"
279278
+ utu:SafeArea.Mode="Margin"
280279
Background="Purple">
281280
```
282-
# [**C#**](#tab/csharp)
281+
**C#**
283282
```diff
284283
new TabBar()
285284
.Grid(row: 2)
286285
+ .SafeArea(SafeArea.InsetMask.Bottom, SafeArea.InsetMode.Margin)
287286
.Background(Colors.Purple)
288287
```
289-
***
288+
290289

291290
![safearea_with_margin_alpha](../assets/safearea_with_margin.png)
292291
***
@@ -319,7 +318,7 @@ Notice in this first example (without `SafeArea` in use) that the Username and P
319318
<td><img src="../assets/safearea-login-static.gif" width="400px"/> </td>
320319
<td>
321320

322-
# [**XAML**](#tab/xaml)
321+
**XAML**
323322
```xml
324323
<Page xmlns:utu="using:Uno.Toolkit.UI" ...>
325324
<Grid Padding="50,0">
@@ -361,7 +360,7 @@ Notice in this first example (without `SafeArea` in use) that the Username and P
361360
</Grid>
362361
</Page>
363362
```
364-
# [**C#**](#tab/csharp)
363+
**C#**
365364
```cs
366365
new Grid()
367366
.Padding(new Thickness(50,0,50,0))
@@ -406,7 +405,7 @@ new Grid()
406405
)
407406

408407
```
409-
***
408+
410409
</td>
411410
</tr>
412411
</table>
@@ -422,7 +421,7 @@ In this next example, we attempt to have the UI adapt to the keyboard by attachi
422421
<td><img src="../assets/safearea-login-static.gif" width="400px"/> </td>
423422
<td>
424423

425-
# [**XAML**](#tab/xaml)
424+
**XAML**
426425
```diff
427426
<StackPanel Grid.Row="2"
428427
x:Name="FormPanel"
@@ -450,7 +449,7 @@ In this next example, we attempt to have the UI adapt to the keyboard by attachi
450449
Margin="0,30" />
451450
</StackPanel>
452451
```
453-
# [**C#**](#tab/csharp)
452+
**C#**
454453
```diff
455454
new StackPanel()
456455
.Grid(row: 2)
@@ -483,7 +482,7 @@ new StackPanel()
483482
.Margin(new Thickness(0, 30, 0, 30))
484483
)
485484
```
486-
***
485+
487486
</td>
488487
</tr>
489488
</table>
@@ -524,50 +523,49 @@ There are alternative usages of `SafeArea` that may be considered in this situat
524523
1. Have your own ScrollViewer defined within the XAML and then you can simply wrap that `ScrollViewer` with any container, such as `Grid`, and use the `SafeArea` attached properties on that wrapping container.
525524

526525
<table>
527-
<tr>
526+
<tr>
528527
<th>Page</th>
529528
<th>XAML</th>
530-
</tr>
529+
</tr>
531530
<tr>
532531
<td><img src="../assets/safearea-login-scroll.gif" width="400px"/> </td>
533532
<td>
534-
# [**XAML**](#tab/xaml)
535-
```diff
536-
<Page ...
537-
xmlns:utu="using:Uno.Toolkit.UI">
538-
+ <Grid utu:SafeArea.Insets="SoftInput">
539-
+ <ScrollViewer>
540-
<Grid Padding="50,0">
541-
<!-- 0: Logo, 1: Spacer, 2: FormPanel -->
542-
<Grid.RowDefinitions>
543-
<RowDefinition Height="Auto" />
544-
<RowDefinition Height="40" />
545-
<RowDefinition Height="*" />
546-
</Grid.RowDefinitions>
547-
...
548-
+ </Grid>
549-
+ </ScrollViewer>
550-
</Grid>
551-
</Page>
552-
```
553-
# [**C#**](#tab/csharp)
554-
```diff
555-
+ new Grid()
556-
+ .SafeArea(SafeArea.InsetMask.SoftInput)
557-
+ .Children(
558-
+ new ScrollViewer()
559-
+ .Content(
560-
new Grid()
561-
.Padding(new Thickness(50,0,50,0))
562-
// 0: Logo, 1: Spacing, 2: FormPanel
563-
.RowDefinitions("Auto, 40, *")
564-
.Children(
533+
**XAML**
534+
```diff
535+
<Page ...
536+
xmlns:utu="using:Uno.Toolkit.UI">
537+
+ <Grid utu:SafeArea.Insets="SoftInput">
538+
+ <ScrollViewer>
539+
<Grid Padding="50,0">
540+
<!-- 0: Logo, 1: Spacer, 2: FormPanel -->
541+
<Grid.RowDefinitions>
542+
<RowDefinition Height="Auto" />
543+
<RowDefinition Height="40" />
544+
<RowDefinition Height="*" />
545+
</Grid.RowDefinitions>
546+
...
547+
+ </Grid>
548+
+ </ScrollViewer>
549+
</Grid>
550+
</Page>
551+
```
552+
**C#**
553+
```diff
554+
+ new Grid()
555+
+ .SafeArea(SafeArea.InsetMask.SoftInput)
556+
+ .Children(
557+
+ new ScrollViewer()
558+
+ .Content(
559+
new Grid()
560+
.Padding(new Thickness(50,0,50,0))
561+
// 0: Logo, 1: Spacing, 2: FormPanel
562+
.RowDefinitions("Auto, 40, *")
563+
.Children(
565564
...
566-
)
567-
+ )
568-
+ )
569-
```
570-
***
565+
)
566+
+ )
567+
+ )
568+
```
571569
</td>
572570
</tr>
573571
</table>

0 commit comments

Comments
 (0)