Hello Guys i need help.
i am using a converter on a binding to set a background color depending on an object id.(stacklayout inside contentview)
<StackLayout.BackgroundColor>
<Binding Path="objectID" Converter="{StaticResource IntToColorConverter}"/>
</StackLayout.BackgroundColor>
This works. Now i want to use the multiconverter (new in Xamarin 4.7) to return a different backgroundcolor depending on other object properties.(for context: object is a calendarentry and if its in the past it should be desaturated or something)
<StackLayout.BackgroundColor>
<MultiBinding Converter="{StaticResource MultiColorConverter}">
<Binding Path="objectID"/>
<Binding Path="value"/>
<Binding Path="value2"/>
</MultiBinding>
</StackLayout.BackgroundColor>
This does not work, since the values that are given to the converter are all NULL and the color becomes black (the return value if all vslues are NULL; so the converter is set up correctly also). It also shows this when i use a break point on the converter, that the array contains only NULL variables.
I don't know what i am missing here, the bindingcontext should be inheritated and does not change. Any hint would be appreciated.
The bindingcontext is set programatically on a contentpage on creation of the ContentView where i provide an object from a list of objects.
var evnt = new TimeTableEventView { BindingContext = Model.calenderevents[j] };