Reputation: 131
I'am a newbie in MVVMCross and I was wondering if an expert can answer a couple of my questions.
I want to handle my virtual keyboard (custom keyboard(similar to the android keyboard) on my android device to type only at a focused edittextfield. I dont know how to do that.
Is there a way to access the control's (any control - button , edittextfield) properties directly from my viewmodel? Maybe you can explain a best practice of handling control events through viewmodels?
Thanks in advance.
Upvotes: 1
Views: 458
Reputation: 975
For Example when you want to access the "Text"-Property of your EditText. Then Create a Property on your ViewModel (YourTextProperty for example) and then use DataBinding. On Android this would like something like:
<EditText local:MvxBind="Text YourTextProperty" />
The MvvmCross Binding-Engine will then automatically execute the setter of your property when the control does change this value...
Upvotes: 3
Reputation: 131
Thanks for the reply.
What I was looking actually was the FindByViewID in my view.cs to get the control properties and events and then pass it to properties in the Viewmodel as you mentioned above.
Upvotes: 0