<Window x:Class="WpfApplication17.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" DataContext="{Binding RelativeSource={RelativeSource Self}}" Title="MainWindow" Height="350" Width="525"> <Grid> <StackPanel> <ListView Name="MyListview" ItemsSource="{Binding GameCollection}"> <ListView.View> <GridView> <GridViewColumn Width="140" Header="Game Name" DisplayMemberBinding="{Binding GameName}" /> <GridViewColumn Width="140" Header="Creator" DisplayMemberBinding="{Binding Creator}" /> <GridViewColumn Width="140" Header="Publisher" DisplayMemberBinding="{Binding Publisher}" /> </GridView> </ListView.View> </ListView> <Button HorizontalAlignment="Right" Margin="5,5,5,5" Content="Add Row" Click="AddRow_Click" /> </StackPanel> </Grid> </Window>
DataContext="{Binding RelativeSource={RelativeSource Self}}";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)