Equivalent to UserControl in Android with the Mvvm

2019-02-25 16:37发布

问题:

I would like to know if there is any equivalent to UserControl in Xamarin.Android using the MvvmCross framework. Because I have a MvxActivity containing a layout I would like to reuse in several Views. And I don't know how to call it in my these several views.

If you have any idea...

Thanks for any help !

回答1:

You could try the MvxFrameControl at the end of N=26 in http://mvvmcross.blogspot.co.uk/

The source code for MvxFrameControl also shows you how to inherit from any Android control in order to add data-binding capabilities - see https://github.com/MvvmCross/MvvmCross/blob/v3.1/Cirrious/Cirrious.MvvmCross.Binding.Droid/Views/MvxFrameControl.cs