Color Binding Android Behaviour

Hello,

I've created a listview of colors by iterating though the color object to get all the field names, I then bind the observablecollction to the listview and use a color converter to convert the color names to a valid color. This all works correctly and displays fine on iOS, however on Android the first 9 box views have the correct background color, but after that all the box view background are white.

There doesn't seem to be any warning or errors, and i'm confused as it's rendering correctly on iOS, has anyone ever came across a problem like this before? Thanks.

Sample of the binding below

<ListView x:Name="colorList" SeparatorVisibility="None" ItemsSource="{Binding Colors}"  SelectedItem="{Binding SelectedColor, Mode=TwoWay}">  
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <ViewCell>
                                <Grid>
                                    <BoxView BackgroundColor="{Binding ., Mode=TwoWay,Converter={StaticResource colorConverter}}"/>
                                </Grid>
                             </ViewCell>
                         </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>  

Best Answer

Answers

Sign In or Register to comment.