I have a listview and I bind the values I get from my DB to my XAML. I bind one value now into my XAML but i wish to bind two values, is it possible or is it only possible in code? If so, how would I accomplish that.
This is my code:
public class items
{
public string infoOne { get; set;}
public string infoTwo { get; set;}
}
async void loadList ()
{
var getItems = await phpApi.getEvents ();
theList = new List <items> ();
foreach (var currentitem in getItems["results"]) {
theList.Add (new items () {
infoOne = currentitem ["name"].ToString (),
infoTwo = currentitem ["phone"].ToString ()
});
mylist.ItemsSource = theList;
}
XAML:
<Label Text = "{Binding infoOne}" /> //How could I add infoTwo to the same label and also add a space between them?