diff --git a/apps/ui-tests-app/css/text-decoration.ts b/apps/ui-tests-app/css/text-decoration.ts index eceb2f30e..1697df70c 100644 --- a/apps/ui-tests-app/css/text-decoration.ts +++ b/apps/ui-tests-app/css/text-decoration.ts @@ -1,17 +1,18 @@ -var obj; - -export function loaded(args) { - obj = args.object; -} +import view = require("ui/core/view"); +import observable = require("data/observable"); +import label = require("ui/label"); export function butonTap(args) { - if (obj.style.textDecoration === "underline") { - obj.style.textDecoration = "line-through"; - } else if (obj.style.textDecoration === "line-through") { - obj.style.textDecoration = "line-through underline"; - } else if (obj.style.textDecoration === "line-through underline") { - obj.style.textDecoration = "none"; - } else if (obj.style.textDecoration === "none") { - obj.style.textDecoration = "underline"; + var btn = args.object; + var lbl = btn.parent.getViewById("Label1"); + + if (lbl.style.textDecoration === "underline") { + lbl.style.textDecoration = "line-through"; + } else if (lbl.style.textDecoration === "line-through") { + lbl.style.textDecoration = "line-through underline"; + } else if (lbl.style.textDecoration === "line-through underline") { + lbl.style.textDecoration = "none"; + } else if (lbl.style.textDecoration === "none") { + lbl.style.textDecoration = "underline"; } } \ No newline at end of file diff --git a/apps/ui-tests-app/css/text-decoration.xml b/apps/ui-tests-app/css/text-decoration.xml index f1a99cadb..4e71c619b 100644 --- a/apps/ui-tests-app/css/text-decoration.xml +++ b/apps/ui-tests-app/css/text-decoration.xml @@ -2,7 +2,7 @@