We are using MVVMCorss and showing the list using MvxListView. We want to add a background color for select item, but it still not working.
<Mvx.MvxListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:choiceMode="multipleChoice"
local:MvxBind="ItemsSource MyItems;SelectedItem MyChosenItem; ItemClick
ItemSelectedCommand;BackgroundColor BlackOrBlueColor(IsItemSelected)"
local:MvxItemTemplate="@layout/_product"/>
We tried using converters like:
public class BlackOrBlueColorValueConverter : MvxColorValueConverter<bool>
{
protected override Color Convert(bool value, object parameter, CultureInfo culture)
{
if (value)
return Color.Black;
else
return Color.Blue;
}
}
We have also tried all the available solutions found in Stackoverflow. Please, help us out here.