Special class public class MyItem { public int Id { get; set; } public string Name { get; set; } } XAML <ListView x:Name="listView"> <ListView.View> <GridView> <GridViewColumn Header="Id" DisplayMemberBinding="{Binding Id}"/> <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}"/> </GridView> </ListView.View> </ListView> Code public Window1() { this.InitializeComponent(); this.listView.Items.Add(new MyItem { Id = 1, Name = "Davidwroxy" }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)