What do you mean about "so that the image of like and the text turns blue".
You want to change the text color when the user selected the item or these images couldn't be rendered correctly as you expected?
@LandLu
Yes, I want to load my list of publications, with the record I have of the likes with a publication the blue icon and the text in blue are loaded
I saw you had a Publicaciones model to access the records from the database. Then we could retrieve a list of this model for display. Bind your list's items source to this list then each item could use binding to display the information. Which part are you confused about?
If you want to know more about the construct of listview this documentation could be helpful: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/listview/
Answers
Do you use ListView or CollectionView to present these data?
Try to define a model class to access the table from the database. Maybe like:
Then deserialize the records to a list of model. Binding the label's text to these properties will make it work.
@LandLu
If so I have my data model.
I am occupying an ObservableCollection.
@LandLu
Get the id, and I want to buy it so that the image of like and the text turns blue
What do you mean about "so that the image of like and the text turns blue".
You want to change the text color when the user selected the item or these images couldn't be rendered correctly as you expected?
@LandLu
Yes, I want to load my list of publications, with the record I have of the likes with a publication the blue icon and the text in blue are loaded
It seems you could load text and images successfully from the database. What's your question now?
@LandLu
how to do it, I bring the idmegusta record, to compare it and thus automatically paint the image and text
I saw you had a
Publicaciones
model to access the records from the database. Then we could retrieve a list of this model for display. Bind your list's items source to this list then each item could use binding to display the information. Which part are you confused about?If you want to know more about the construct of listview this documentation could be helpful:
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/listview/