Change textColor in list view item programmatically

后端 未结 3 704
孤街浪徒
孤街浪徒 2021-01-29 13:49

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 13:54

    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

提交回复
热议问题