Binding Android.Views.View with ViewModel with MvvmCross on Android
<p>I am trying to bind the info contents window that apprears when clicking on a marker in a MapView for android.</p>

<p>I have created a custom manager class that takes an ItemSource and a MapView (ObservableCollection) and adds markers on the map as the collection changes. </p>

<p>Now I would like to bind the InfoContent window that is generated by <a href="https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.InfoWindowAdapter.html#public-methods" rel="nofollow">GetInfoContents(Marker marker)</a> </p>

<p>Currently I am forced to retrieve populate the fields manually as below but I would like the fields to be data bound directly in the layout with the current ViewModel </p>

<pre><code>public override Android.Views.View GetInfoContents(object item, Marker marker)
        {
            var vm = item as DetailCalloutViewModel;
            if (vm != null) {
                var view = _layoutInflater.Inflate(Resource.Layout.view_store_marker_info_window, null);
                var address = view.FindViewById&lt;TextView&gt;(Resource.Id.address);
                var description = view.FindViewById&lt;TextView&gt;(Resource.Id.description);
                var badge = view.FindViewById&lt;TextView&gt;(Resource.Id.badge);

                address.Text = vm.Address;
                description.Text = vm.Location.Description;
                badge.Text = vm.BadgeNumber;
                return view;
            }

            return null;
        } 
</code></pre>