Reputation: 3455
I am developing an app in Xamarin Android along with MvvmCross. MvvmCross helps to bind view properties in layout directly to ViewModels. For EditText, we can bind the text like
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
local:MvxBind="Text Property" />
I need to bind SearchView text using MvvmCross. I tried Text
like below but it doesn't work.
<SearchView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:queryHint="Customer name"
local:MvxBind="Text SearchString" />
How Is it possible to bind SearchView text using MvvmCross?
Upvotes: 4
Views: 1106
Reputation: 24470
For SearchView
you need to use the Query
property:
<SearchView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:queryHint="Customer name"
local:MvxBind="Query SearchString" />
Upvotes: 7