Binding multiple properties through converter to one value

Viewed 705

I'm using MvvmCross 4 and trying to bind to the backgroundColor of ListView elements in axml. The problem now is that the color depends on 2 properties in my model: bool IsSpecialCategory and bool IsNsfw - each combination should get another color.

In iOS, using the fluent syntax, it was no problem to use the whole model in the converter, but is this possible in Android using axml? The easiest solution would be to feed the converter with the whole model in the item layouts, not just a property:

<LinearLayout [...]
local:MvxBind="backgroundColor ItemBackgroundColorConverter(theWholeModelNotJustAProperty)">
2 Answers
Related