From 46fcc22672869059b209afdeaa6a1fc968bf351c Mon Sep 17 00:00:00 2001 From: Nedyalko Nikolov Date: Wed, 4 Mar 2015 14:49:14 +0200 Subject: [PATCH] Added some links to ApiReference. --- apps/tests/layouts/absolute-layout-tests.ts | 2 +- apps/tests/layouts/grid-layout-tests.ts | 30 ++++++++++++++----- apps/tests/ui/page/page-tests-common.ts | 5 ---- ui/editable-text-base/editable-text-base.d.ts | 6 ++-- ui/image/image.d.ts | 2 +- 5 files changed, 28 insertions(+), 17 deletions(-) diff --git a/apps/tests/layouts/absolute-layout-tests.ts b/apps/tests/layouts/absolute-layout-tests.ts index 7f763469f..4031a1118 100644 --- a/apps/tests/layouts/absolute-layout-tests.ts +++ b/apps/tests/layouts/absolute-layout-tests.ts @@ -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; diff --git a/apps/tests/layouts/grid-layout-tests.ts b/apps/tests/layouts/grid-layout-tests.ts index 26827a1d2..2bd9e018c 100644 --- a/apps/tests/layouts/grid-layout-tests.ts +++ b/apps/tests/layouts/grid-layout-tests.ts @@ -498,18 +498,18 @@ export function test_GridLayout_padding() { export var test_codesnippets = function () { // // ## 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 + // + //