Back to Nativescript

slider

apps/automated/src/ui/slider/slider.md

9.0.20-core645 B
Original Source

Slider

Using a slider requires the Slider module. {%snippet article-require-slider%}

Binding the Progress and Slider value properties to a observable view-model property.

XML
<Page loaded="pageLoaded">
 <StackLayout orientation="vertical">
   {%raw%}<Progress value="{{ someProperty }}" />
   <Slider value="{{ someProperty }}" />{%endraw%}
 </StackLayout>
</Page>

{%snippet article-binding-slider-properties%}

Creating a slider

{%snippet article-creating-slider%}

Setting the slider value and bounds

{%snippet article-setting-slider-values%}

Binding value property to a model

{%snippet article-binding-value-property%}