Files
NativeScript/apps/ui-tests-app/css/text-decoration.ts
Vladimir Enchev 44a4324166 apps updated
2015-11-12 14:31:14 +02:00

18 lines
710 B
TypeScript

import view = require("ui/core/view");
import observable = require("data/observable");
import label = require("ui/label");
export function butonTap(args) {
var btn = <view.View>args.object;
var lbl = <label.Label>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";
}
}