title: How do I get rid of the empty table in my gridview WPF?
body: <p>So I recently created a GridView in WPF for my database application.
  It holds the usernames and passwords for my website users and it works perfectly,
  The only issue is that it adds the empty columns to the right but I have no diea why.
  What did I do wrong and how do properly do it?
  I cant click the right columns its like its just null.</p>
  
  <p>XML</p>
  
  <pre><code>&lt;DataGrid HeadersVisibility="Column" CanUserAddRows="False" BorderBrush="Black" Name="dgAccounts" Foreground="Black" Margin="10,103,405,10"&gt;
                  &lt;DataGrid.Columns&gt;
                  &lt;/DataGrid.Columns&gt;
              &lt;/DataGrid&gt;
  </code></pre>
  
  <p>C#</p>
  
  <pre><code>private void RetrieveUserData()
          {
              string line;
              using (WebClient wc = new WebClient())
              {
                  string accs = wc.DownloadString(Clipboard.GetText());
  
                  using (StringReader sr = new StringReader(accs))
                  {
                      while ((line = sr.ReadLine()) != null)
                      {
                          newAccounts.Add(new Accounts { Username = theUsername, Password = thePassword });
                      }
                  }
              }
              dgAccounts.ItemsSource = newAccounts;
          }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/moTkP.png" rel="nofollow noreferrer">Here you can see what the problem looks like</a></p>