Added some links to ApiReference.

This commit is contained in:
Nedyalko Nikolov
2015-03-04 14:49:14 +02:00
parent 3903ec13a6
commit 46fcc22672
5 changed files with 28 additions and 17 deletions

View File

@ -23,7 +23,7 @@ export var testAll = function () {
absoluteLayout.height = 230;
absoluteLayout.style.backgroundColor = new colorModule.Color("LightGray");
var label;
// Left Top
//// In absolute layout place of an UI element is determined by 4 parameters : left, top, width and height.
label = new labelModule.Label();
label.width = 100;
label.height = 100;

View File

@ -498,18 +498,18 @@ export function test_GridLayout_padding() {
export var test_codesnippets = function () {
// <snippet module="ui/layouts/grid-layout" title="grid-layout">
// ## GridLayout sample
// ### Create GridLayout with 3 columns - 80px, *, auto size and 2 rows - 100px and auto size
// ### Creating Grid Layout via code.
// ``` JavaScript
//var layout = require("ui/layouts/grid-layout");
var gridLayout = new layout.GridLayout();
// ```
// ### Add views to grid layout
// ``` JavaScript
var btn1 = new button.Button();
var btn2 = new button.Button();
var btn3 = new button.Button();
var btn4 = new button.Button();
// ```
// ### Add views to layout
// ``` JavaScript
gridLayout.addChild(btn1);
gridLayout.addChild(btn2);
gridLayout.addChild(btn3);
@ -533,12 +533,17 @@ export var test_codesnippets = function () {
layout.GridLayout.setColumnSpan(btn4, 3);
// ```
// ### Create ItemSpec for columns and rows
// ### Create ItemSpec for columns and rows 3 columns - 80px, *, auto size and 2 rows - 100px and auto size
// ``` JavaScript
//// ItemSpec modes of the column refers to its width.
//// Absolute size of the column
var firstColumn = new layout.ItemSpec(80, layout.GridUnitType.pixel);
//// Star width means that this column will expand to fill the gap left from other columns
var secondColumn = new layout.ItemSpec(1, layout.GridUnitType.star);
//// Auto size means that column will expand or shrink in order to give enough place for all child UI elements.
var thirdColumn = new layout.ItemSpec(1, layout.GridUnitType.auto);
//// Star and Auto modes for rows behave like corresponding setting for columns but refer to row height.
var firstRow = new layout.ItemSpec(1, layout.GridUnitType.auto);
var secondRow = new layout.ItemSpec(1, layout.GridUnitType.star);
// ```
@ -551,5 +556,16 @@ export var test_codesnippets = function () {
gridLayout.addRow(firstRow);
gridLayout.addRow(secondRow);
// ```
// ### Create same grid layout with an xml declaration
// ``` XML
// <GridLayout columns="80, *, auto" rows="auto, *" >
// <Button col="0" />
// <Button col="1" />
// <Button col="2" />
//// by default column and row are set to 0
// <Button row="1" colSpan="3" />
// </GridLayout>
// ```
// </snippet>
};

View File

@ -280,12 +280,7 @@ export var test_cssShouldBeAppliedToAllNestedElements = function () {
StackLayout = new stackLayoutModule.StackLayout();
StackLayout.addChild(label);
testPage.content = StackLayout;
//<snippet module="ui/page" title="Page">
//### Adding a css that affects all nested UI components.
//``` JavaScript
testPage.css = "stackLayout {background-color: #ffff0000;} label {background-color: #ff00ff00;}";
//```
//</snippet>
return testPage;
};

View File

@ -14,12 +14,12 @@
constructor(options?: Options);
/**
* Gets or sets the soft keyboard type.
* Gets or sets the soft keyboard type. Possible values are contained in the [KeyboardType enumeration](../enums/KeyboardType/README.md).
*/
keyboardType: string;
/**
* Gets or sets the soft keyboard return key flavor.
* Gets or sets the soft keyboard return key flavor. Possible values are contained in the [ReturnKeyType enumeration](../enums/ReturnKeyType/README.md).
*/
returnKeyType: string;
@ -30,7 +30,7 @@
/**
* Gets or sets a value indicating when the text property will be updated.
* Possible values are contained in the UpdateTextTrigger enumeration located in "ui/enums" module.
* Possible values are contained in the [UpdateTextTrigger enumeration](../enums/UpdateTextTrigger/README.md).
*/
updateTextTrigger: string;

2
ui/image/image.d.ts vendored
View File

@ -61,7 +61,7 @@ declare module "ui/image" {
url: string;
/**
* Gets or sets the image stretch mode.
* Gets or sets the image stretch mode. Possible values are contained in the [Stretch enumeration](../enums/Stretch/README.md).
*/
stretch: string;
}