Here's your xaml - pay attention to the bindings on the grid columns:
<ListView.View>
<GridView>
<GridViewColumn Header="Name" DisplayMemberBinding="{Binding Path=Name}"/>
<GridViewColumn Header="Value" DisplayMemberBinding="{Binding Path=Value}"/>
</GridView>
</ListView.View>
public class BoringData
{
public string Name { get; set; }
public string Value { get; set; }
}
//utterly boring call to generate your data item
BoringData boredom = getBoringData(index);//<-- whatever
//add the item to the listView
this.myListView.Items.Add(boredom);
No comments:
Post a Comment