Reputation: 65
My application retrieves data from a firebase backend. The data is retrieved and put into a list object
list type and its variables
public class UserLogs
{
public Guid UserID { get; set; }
public string logData { get; set; }
public string sliderValue { get; set; }
public string logTime { get; set; }
}
}
List<UserLogs> foundLogs = new List<UserLogs>();
Getting the required data from firebase
foundLogs = (await firebaseClient
.Child("UserLogs")
.OnceAsync<UserLogs>()).Where(a => a.Object.UserID == userID).Select(item => new UserLogs
{
UserID = item.Object.UserID,
logData = item.Object.logData,
sliderValue = item.Object.sliderValue,
logTime = item.Object.logTime
}).ToList();
When trying to display this list to a list view it will display as the object name e.g.
How do I display the data at each index of the list in a listview? For example if I wanted to display the UserID or logData as seen in the variable watch window, how would I do this?
How I am currently displaying the list
//list of logs being the name of the list view in the xaml file
ListOfLogs.ItemsSource = foundLogs;
Thank you in advance
Upvotes: 2
Views: 1815