I\'ve seen Xamarin recently released as component http://components.xamarin.com/view/xamandroidsupportv7appcompat
I would like to use it with MvvmCross in my app, but I
There is no way to bind ActionBar to ICommands with MvvmCross. But you can use a simple trick and call into your ICommands from the activity when a button on ActionBar is pressed.
public override bool OnCreateOptionsMenu(IMenu menu)
{
this.MenuInflater.Inflate(Resource.Menu.QuoteDetails, menu);
m_MenuItem_EditQuote = menu.FindItem(Resource.Id.menu_EditQuote);
m_MenuItem_EditQuote.SetVisible(ViewModel.CanEdit);
return true;
}
public override bool OnOptionsItemSelected(IMenuItem item)
{
switch (item.ItemId)
{
case Resource.Id.menu_EditQuote:
ViewModel.EditQuoteCommand.Execute(null);
return true;
case Resource.Id.menu_ViewQuote:
ViewModel.DownloadQuoteCommand.Execute(null);
return true;
case Resource.Id.menu_EmailQuote:
ViewModel.EmailQuoteCommand.Execute(null);
return true;
default:
return base.OnOptionsItemSelected(item);
}
}