From 2b292eec7c261aef32793c6762b81651500469a5 Mon Sep 17 00:00:00 2001 From: vakrilov Date: Fri, 3 Jul 2015 17:12:08 +0300 Subject: [PATCH] Test page and fixes --- CrossPlatformModules.csproj | 10 +++- apps/tests/pages/background-test.ts | 17 +++--- apps/tests/pages/background-test.xml | 31 ++++++++++- ui/styling/background-common.ts | 9 +-- ui/styling/background.android.ts | 8 --- ui/styling/background.d.ts | 5 -- ui/styling/background.ios.ts | 13 ----- ui/styling/font.ios.ts | 3 - ui/styling/stylers.android.ts | 82 ++++++++++------------------ 9 files changed, 71 insertions(+), 107 deletions(-) diff --git a/CrossPlatformModules.csproj b/CrossPlatformModules.csproj index c98199ee1..0baa7d804 100644 --- a/CrossPlatformModules.csproj +++ b/CrossPlatformModules.csproj @@ -657,8 +657,12 @@ - - + + fonts-test.xml + + + background-test.xml + Designer @@ -1665,7 +1669,7 @@ False - + \ No newline at end of file diff --git a/apps/tests/pages/background-test.ts b/apps/tests/pages/background-test.ts index ba507f48f..9c82bb920 100644 --- a/apps/tests/pages/background-test.ts +++ b/apps/tests/pages/background-test.ts @@ -1,15 +1,12 @@ import observable = require("data/observable"); import pages = require("ui/page"); - -var vm = new observable.Observable(); -// Event handler for Page "loaded" event attached in main-page.xml -export function pageLoaded(args: observable.EventData) { - vm.set("style", "background-image: url('~/pages/test2.png'); \nborder-color: green; \nborder-radius: 20; \nborder-width: 4;"); - // Get the event sender - var page = args.object; - page.bindingContext = vm; +import view = require("ui/core/view"); +export function applyTap(args) { + var el = view.getViewById(view.getAncestor(args.object, "Page"), "test-element"); + (el).style = args.object.tag; } -export function applyTap(args){ - args.object.parent.style = vm.get("style"); +export function resetTap(args) { + var el = view.getViewById(view.getAncestor(args.object, "Page"), "test-element"); + (el).style = ""; } \ No newline at end of file diff --git a/apps/tests/pages/background-test.xml b/apps/tests/pages/background-test.xml index 01e51e5e7..018f7ed2a 100644 --- a/apps/tests/pages/background-test.xml +++ b/apps/tests/pages/background-test.xml @@ -1,6 +1,31 @@ - - -