How-To files generated with markdown spippet injector

This commit is contained in:
Nikolay Iliev
2016-04-15 14:49:44 +03:00
parent ee292f771f
commit cdeba37c72
10 changed files with 204 additions and 154 deletions

View File

@@ -161,42 +161,28 @@ export class StackLayoutTest extends testModule.UITest<StackLayout> {
}
public test_codesnippets() {
// <snippet module="ui/layouts/stack-layout" title="stack-layout">
// ### import StackLayout and Button classes
// >> stack-layout-new
// var StackLayout = require("ui/layouts/stack-layout").StackLayout;
// >> (hide)
// var Button = require("ui/button").Button;
// ### Create StackLayout
// ``` JavaScript
// << (hide)
var stackLayout = new StackLayout();
// ```
// << stack-layout-new
// ### Declaring a StackLayout.
//``` XML
// <Page>
// <StackLayout orientation="horizontal">
// <Label text="This is Label 1" />
// </StackLayout>
// </Page>
//```
// </snippet>
// ### Add child view to layout
// ``` JavaScript
// >> stack-layout-addchild
var btn = new Button();
stackLayout.addChild(btn);
// ```
// << stack-layout-addchild
// ### Remove child view from layout
// ``` JavaScript
// >> stack-layout-remove
stackLayout.removeChild(btn);
// ```
// << stack-layout-remove
// ### Change layout orientation to Horizontal
// ``` JavaScript
// >> stack-layout-horizontal
stackLayout.orientation = enums.Orientation.horizontal;
// ```
// << stack-layout-horizontal
// </snippet>
}
private setup_percent(): layoutHelper.MyButton {