mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
725 B
725 B
nav-title | title | environment | description | previous_url |
---|---|---|---|---|
button How-To | button | nativescript | Examples for using button | /ApiReference/ui/button/HOW-TO |
Button
Declaring button module
Button module is required to use any button feature. {%snippet button-require%}
Other frequently used modules when working with buttons include: {%snippet button-require-others%}
Attaching event handler for the button tap event.
<Page>
<Button tap="buttonTap" />
</Page>
Creating a button
{%snippet button-create%}
Setting the text of a button
{%snippet button-settext%}
Responding to the tap event
{%snippet button-tap%}
Binding text property directly to model
{%snippet button-bind%}