<Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="23*" /> <ColumnDefinition Width="255*" /> <ColumnDefinition Width="0*" /> </Grid.ColumnDefinitions> <ListView Height="114" Margin="10,10,9,0" Name="lstView" VerticalAlignment="Top" Grid.ColumnSpan="2"> <ListView.View> <GridView> <GridViewColumn Header="ID" Width="40"></GridViewColumn> <GridViewColumn Header="User Name" Width="100"></GridViewColumn> </GridView> </ListView.View> </ListView> <Label Margin="59,0,76,70" Name="label1" Height="28" VerticalAlignment="Bottom" Grid.Column="1"></Label> </Grid>
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace listview { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { lstView.Items.Add("vishal"); // lstView. } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)