title: How to fill listview in WPF C#
body: <p>I`m trying to fill list view on window loaded event but Nothing comes out.</p>
  
  <p>This is my XAML</p>
  
  <pre><code>&lt;ListView Height="142" Name="listView1" Width="371"&gt;
              &lt;ListView.View&gt;
                  &lt;GridView&gt;
                      &lt;GridViewColumn Width="60" Header="ID"/&gt;
                      &lt;GridViewColumn Width="300" Header="User Name" /&gt;
                  &lt;/GridView&gt;
              &lt;/ListView.View&gt;
          &lt;/ListView&gt;
      &lt;/GroupBox&gt;
  </code></pre>
  
  <p>this my c# code :</p>
  
  <pre><code>  private void Window_Loaded(object sender, RoutedEventArgs e)
      {
  
          ArrayList _ID = new ArrayList();
          ArrayList _UserList = new ArrayList();
  
          using (DataClasses1DataContext dc = new DataClasses1DataContext())
          {
              var Users = (from u in dc.users select u.username).ToList();
  
              for (int i = 0; i &lt; Users.Count(); i++)
              {
                  _UserList.Add(Users[i]).ToString();
              }
  
  
              using (DataClasses1DataContext dcc = new DataClasses1DataContext())
              {
                  var ID = (from u in dcc.users select u.id).ToList();
  
                  for (int i = 0; i &lt; ID.Count(); i++)
                  {
                      _ID.Add(ID[i]).ToString();
                  }
  
              }
          }
  </code></pre>
  
  <p>Please help </p>