If I have a GestureListener Tap event in a Data Template, where would I be able to handle the Tap event? It's a data template so therefore, no code behind.开发者_高级运维
What strategies have you used to conform to MVVM patterns?
My alternative now is to define the data template on the control itself and then handling the OnTap event in code, but would like to know what others have done.
Thanks.
I got it working.
Basically I used an attached behavior and triggered on the Tap event. GestureService has a GetGestureListener static method which gives me a reference of the gesture of which I can invoke commands from the view model.
精彩评论