diff --git a/apps/toolbox/src/pages/labels.ts b/apps/toolbox/src/pages/labels.ts
index 6a625c8f3..445138a06 100644
--- a/apps/toolbox/src/pages/labels.ts
+++ b/apps/toolbox/src/pages/labels.ts
@@ -1,4 +1,4 @@
-import { Page, Observable, EventData } from '@nativescript/core';
+import { Page, Observable, EventData, Label, Color } from '@nativescript/core';
let page: Page;
@@ -7,4 +7,23 @@ export function navigatingTo(args: EventData) {
page.bindingContext = new SampleData();
}
-export class SampleData extends Observable {}
+export class SampleData extends Observable {
+ strokeLabel: Label;
+
+ loadedStrokeLabel(args) {
+ this.strokeLabel = args.object;
+ }
+
+ toggleStrokeStyle() {
+ if (this.strokeLabel.style.textStroke) {
+ this.strokeLabel.style.color = new Color('black');
+ this.strokeLabel.style.textStroke = null;
+ } else {
+ this.strokeLabel.style.color = new Color('white');
+ this.strokeLabel.style.textStroke = {
+ color: new Color('black'),
+ width: { value: 2, unit: 'px' },
+ };
+ }
+ }
+}
diff --git a/apps/toolbox/src/pages/labels.xml b/apps/toolbox/src/pages/labels.xml
index 6d6175529..a9239d3e9 100644
--- a/apps/toolbox/src/pages/labels.xml
+++ b/apps/toolbox/src/pages/labels.xml
@@ -25,6 +25,9 @@
+
+
+