Files
NativeScript/apps/tests/ui/segmented-bar/segmented-bar.md
Erjan Gavalji f15f283c74 Reorder test file structure to match the modules
Needed to have a nice structured cookbook dir in the docs

Includes:
Move the data-module tests under the data dir
Move the frame tests under the ui dir
Rename the dialog.md file to dialogs.md
Fix the web-view title
Add previous_url attributes to each article for SEO
Rename the style dir to styling to match the reference
Fix the frame-tests path
2016-05-05 10:43:35 +03:00

27 lines
851 B
Markdown

---
nav-title: "SegmentedBar How-To"
title: "segmented-bar"
description: "Examples for using SegmentedBar"
previous_url: /ApiReference/ui/segmented-bar/HOW-TO
---
# SegmentedBar
Using a SegmentedBar requires the "ui/segmented-bar" module.
<snippet id='article-require-segmentedbar-module'/>
## Creating a SegmentedBar
<snippet id='article-create-segmentedbar'/>
``` XML
<SegmentedBar>
<SegmentedBar.items>
<SegmentedBarItem title="Item 1" />
<SegmentedBarItem title="Item 2" />
<SegmentedBarItem title="Item 3" />
</SegmentedBar.items>
</SegmentedBar>
```
### Creating segmentedBar.items
It is important that an items array gets created and filled with
items first and then assigned to the segmented bar.
<snippet id='article-creating-segmentedbar-items'/>
### Selecting an item programmatically
<snippet id='artcile-selecting-item'/>