title: Listbox Databinding in wpf
body: <p>I am binding the data coming form database to <code>ListBoxItem's</code>, below is the code:</p>
  
  <pre><code>public void load_users()
  {
      RST_DBDataContext conn = new RST_DBDataContext();
      List&lt;TblUser&gt; users = (from s in conn.TblUsers
                                    select s).ToList();
      Login_Names.ItemsSource = users;
  }
  </code></pre>
  
  <p>And in XAML, there is the below code:</p>
  
  <pre><code>&lt;ListBox Name="Login_Names" 
           ItemsSource="{Binding Path=UserName}"
           HorizontalAlignment="Left" 
           Height="337" Margin="10,47,0,0"
           Padding="0,0,0,0" VerticalAlignment="Top" Width="156"&gt;
  </code></pre>
  
  <p>But it does not works, it shows table name, but I need to see the usernames coming from table, there is column called UserName in TblUsers.</p>
  
  <p>Thanks in Advance.</p>