I have a Listview where, depending on the data I'm showing, is supposed to draw with different colors, but draws with the wrong colors.
I clear it (itemList.Clear) then set the color with:
itemList.TwoLinesLayout.Label.TextColor = Colors.Red
or
itemList.TwoLinesLayout.Label.TextColor = Colors.Blue
Then I add my items to it.
This does not always give me accurate results though. Sometimes the whole list stays the previous color and both types of data show Red or both will show Blue when I toggle...or even weirder they will all be the correct color except 1-2 of them the wrong color (Often the first item and one of the last ones that is usually not visible until I scroll it up).
If I add a DoEvents after the color change it improves it slightly, but still has wrong colors. I even tried invalidating it after adding all my items and it still colors wrong. How it draws two different colors is confusing too since I assume these colors are global to the Listview, so they should all be the same color.
I clear it (itemList.Clear) then set the color with:
itemList.TwoLinesLayout.Label.TextColor = Colors.Red
or
itemList.TwoLinesLayout.Label.TextColor = Colors.Blue
Then I add my items to it.
This does not always give me accurate results though. Sometimes the whole list stays the previous color and both types of data show Red or both will show Blue when I toggle...or even weirder they will all be the correct color except 1-2 of them the wrong color (Often the first item and one of the last ones that is usually not visible until I scroll it up).
If I add a DoEvents after the color change it improves it slightly, but still has wrong colors. I even tried invalidating it after adding all my items and it still colors wrong. How it draws two different colors is confusing too since I assume these colors are global to the Listview, so they should all be the same color.