Text transform - no default value

This commit is contained in:
vakrilov
2017-03-23 16:51:41 +02:00
parent 86b9be340a
commit be85af4a0d
11 changed files with 147 additions and 39 deletions

View File

@@ -19,6 +19,7 @@ export function pageLoaded(args: EventData) {
examples.set("tabmore", "tab-view/tab-view-more");
examples.set("tabViewCss", "tab-view/tab-view-css");
examples.set("tab-view-icons", "tab-view/tab-view-icon");
examples.set("text-transform", "tab-view/text-transform");
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
page.bindingContext = viewModel;

View File

@@ -0,0 +1,18 @@
import { Page } from "tns-core-modules/ui/page";
const CSS = `
#tab1 { text-transform: none; }
#tab2 { text-transform: lowercase; }
#tab3 { text-transform: uppercase; }
#tab4 { text-transform: capitalize; }
`
export function applyTap(args) {
var page = <Page>args.object.page;
page.css = CSS;
}
export function resetTap(args) {
var page = <Page>args.object.page;
page.css = "";
}

View File

@@ -0,0 +1,29 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="onNavigate">
<TabView>
<TabView.items>
<TabViewItem title="tAb ViEw" id="tab1">
<TabViewItem.view>
<StackLayout>
<Button text="apply" tap="applyTap"/>
<Button text="reset" tap="resetTap"/>
</StackLayout>
</TabViewItem.view>
</TabViewItem>
<TabViewItem title="tAb ViEw" id="tab2">
<TabViewItem.view>
<Label text="empty tab" />
</TabViewItem.view>
</TabViewItem>
<TabViewItem title="tAb ViEw" id="tab3">
<TabViewItem.view>
<Label text="empty tab" />
</TabViewItem.view>
</TabViewItem>
<TabViewItem title="tAb ViEw" id="tab4">
<TabViewItem.view>
<Label text="empty tab" />
</TabViewItem.view>
</TabViewItem>
</TabView.items>
</TabView>
</Page>