Change textColor in list view item programmatically

后端 未结 3 1675
后悔当初
后悔当初 2021-01-29 13:40

I want to do something like this:

 textLabel_inCell.TextColor = Color.Black;

but Visual Studio shows an error:

\"textLabel_inCell doesn

3条回答
  •  孤城傲影
    2021-01-29 14:17

    Yes, textLabel really doesn't exist as there is no single textLabel but rather many of them in the ListView.

    In general this is done with data binding: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/data-binding-basics#bindings-and-collections

提交回复
热议问题