This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve
asked on 12 Mar 2015, 01:48 PM
http://docs.nativescript.org/ApiReference/ui/switch/Switch
Why is there no event to hook into for the switch, should be be using like tap or something instead?
Why is there no event to hook into for the switch, should be be using like tap or something instead?
4 Answers, 1 is accepted
0
Hello Steve,
Can you provide more info about your case? Generally you can bind checked property of the Switch to a property in your view model.
Regards,
Vlad
Telerik
Can you provide more info about your case? Generally you can bind checked property of the Switch to a property in your view model.
Regards,
Vlad
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 13 Mar 2015, 08:44 AM
It is indeed already bound...I just wanted to save the data when the user toggles it.
0
Hello,
In this case you can execute the code from the property setter of the your view model property. In this case you will have complete separation between the UI and your business logic and will avoid any problems related to events like coupling and possible memory leaks.
Regards,
Vlad
Telerik
In this case you can execute the code from the property setter of the your view model property. In this case you will have complete separation between the UI and your business logic and will avoid any problems related to events like coupling and possible memory leaks.
Regards,
Vlad
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 13 Mar 2015, 01:14 PM
Okay good call!