make articles consistent in structure

This commit is contained in:
Peter Kanev
2016-05-05 15:24:52 +03:00
parent 16e769a1cc
commit a9fdc3359d
6 changed files with 32 additions and 28 deletions

View File

@ -1,12 +1,13 @@
---
nav-title: "absolute-layout How-To"
title: "absolute-layoyt"
title: "absolute-layout"
description: "Examples for using absolute-layout"
---
# AbsoluteLayout
Using a AbsoluteLayout requires the AbsoluteLayout module.
Using an AbsoluteLayout requires the AbsoluteLayout module.
<snippet id='absolute-layout-require'/>
### Declaring an AbsoluteLayout
``` XML
<Page>
<AbsoluteLayout>

View File

@ -7,7 +7,7 @@ description: "Examples for using dock-layout"
Using a DockLayout requires the DockLayout module.
<snippet id='dock-layout-require'/>
### Declaring a DockLayout.
### Declaring a DockLayout
``` XML
<Page>
<DockLayout stretchLastChild="true">

View File

@ -3,11 +3,11 @@ nav-title: "grid-layout How-To"
title: "grid-layout"
description: "Examples for using grid-layout"
---
## GridLayout sample
### Creating Grid Layout via code.
# GridLayout
Using a GridLayout requires the GridLayout module.
<snippet id='grid-layout-require'/>
### Create grid layout with an xml declaration
### Declaring a GridLayout
``` XML
<GridLayout columns="80, *, auto" rows="auto, *" >
<Button col="0" />
@ -18,20 +18,20 @@ description: "Examples for using grid-layout"
</GridLayout>
```
### Add views to grid layout
## Add views to grid layout
<snippet id='grid-layout-addviews'/>
### Set column property on views - btn1 in first column, btn2 is second and btn3 in third
## Set column property on views - btn1 in first column, btn2 is second and btn3 in third
<snippet id='grid-layout-setcolumn'/>
### Set row property on btn4.
## Set row property on btn4.
<snippet id='grid-layout-setrow'/>
### Set columnSpan property on btn4 to stretch into all columns
## Set columnSpan property on btn4 to stretch into all columns
<snippet id='grid-layout-columnspan'/>
### Create ItemSpec for columns and rows 3 columns - 80px, *, auto size and 2 rows - 100px and auto size
## Create ItemSpec for columns and rows 3 columns - 80px, *, auto size and 2 rows - 100px and auto size
<snippet id='grid-layout-itemspec'/>
### Add columns and rows to GridLayout
## Add columns and rows to GridLayout
<snippet id='grid-layout-add-rowscols'/>

View File

@ -161,9 +161,11 @@ export class StackLayoutTest extends testModule.UITest<StackLayout> {
}
public test_codesnippets() {
// >> stack-layout-require
// var StackLayout = require("ui/layouts/stack-layout").StackLayout;
// << stack-layout-require
// >> stack-layout-new
// var StackLayout = require("ui/layouts/stack-layout").StackLayout;
// >> (hide)
// var Button = require("ui/button").Button;
// << (hide)

View File

@ -3,12 +3,10 @@ nav-title: "stack-layout How-To"
title: "stack-layout"
description: "Examples for using stack-layout"
---
### import StackLayout and Button classes
var StackLayout = require("ui/layouts/stack-layout").StackLayout;
var Button = require("ui/button").Button;
### Create StackLayout
<snippet id='stack-layout-new'/>
# StackLayout
Using a StackLayout requires the StackLayout module.
<snippet id='stack-layout-require'/>
### Declaring a StackLayout.
``` XML
<Page>
@ -18,12 +16,15 @@ var Button = require("ui/button").Button;
</Page>
```
### Add child view to layout
## Create StackLayout
<snippet id='stack-layout-new'/>
## Add child view to layout
<snippet id='stack-layout-addchild'/>
### Remove child view from layout
## Remove child view from layout
<snippet id='stack-layout-remove'/>
### Change layout orientation to Horizontal
## Change layout orientation to Horizontal
<snippet id='stack-layout-horizontal'/>

View File

@ -7,12 +7,6 @@ description: "Examples for using WrapLayout"
Using a WrapLayout requires the WrapLayout module.
<snippet id='wrap-layout-require'/>
Other frequently used modules when working with a WrapLayout include:
<snippet id='wrap-layout-others'/>
## Creating a WrapLayout
<snippet id='wrap-layout-new'/>
### Declaring a WrapLayout.
``` XML
<Page>
@ -25,5 +19,11 @@ Other frequently used modules when working with a WrapLayout include:
</Page>
```
Other frequently used modules when working with a WrapLayout include:
<snippet id='wrap-layout-others'/>
## Creating a WrapLayout
<snippet id='wrap-layout-new'/>
## Setting the orientation of a wrap-layout.
<snippet id='wrap-layout-orientation'/>