public class Person
{
public int ID { get; set; }
public string Name { get; set; }
public string Address { get; set; }
}
Now i have a List
So in the .xaml I define a listbox as:
<ListBox x:Name="ListBoxPerson">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding ForeignKeyName}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
And now in .xaml.cs i define the itemSource of the ListBox as ListBoxPerson.ItemSource=lstPerson;
So, this is so simple to use data binding in ListBox.