title: WPF - The name does not exist in the namespace
body: <p>I know there are a lot of questions on this subject and I have read most of them and tried out most of the suggestions without any success.</p>
  <p>I have deleted the bin, obj and .vs folders, closed visual studio, rebooted my laptop amongst other things.</p>
  <p>I am new to WPF and xaml so any help would be much appreciated. I am using Visual Studio 2022</p>
  <pre><code>&lt;Window x:Class=&quot;WPF_Datagrid.MainWindow&quot;
          xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
          xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
          xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
          xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
          xmlns:local=&quot;clr-namespace:WPF_Datagrid;assembly=WPF_Datagrid&quot;
          mc:Ignorable=&quot;d&quot;
          Title=&quot;MainWindow&quot; Height=&quot;450&quot; Width=&quot;800&quot;&gt;
      &lt;Window.DataContext&gt;
          &lt;local:Songs/&gt;
      &lt;/Window.DataContext&gt;
      &lt;Grid&gt;
          &lt;DataGrid x:Name=&quot;DG&quot; &gt;&lt;/DataGrid&gt;
      &lt;/Grid&gt;
  </code></pre>
  <p><strong>CS Code</strong></p>
  <pre><code>using System.Windows;
  using System.Collections.Generic;
  using System.IO;
  
  namespace WPF_Datagrid
  {
      /// &lt;summary&gt;
      /// Interaction logic for MainWindow.xaml
      /// &lt;/summary&gt;
      public partial class MainWindow : Window
      {
          public MainWindow()
          {
              InitializeComponent();
              //DG.ItemsSource = Songs.GetSongs();
          }
  
          public class Songs
          {
              public List&lt;Song&gt; SongList { get; set; } = GetSongs();
              public static List&lt;Song&gt; GetSongs()
              {
                  var file = @&quot;C:\Users\*********\Documents\Songs.csv&quot;;
                  var lines = File.ReadAllLines(file);
                  var list = new List&lt;Song&gt;();    
                  for(int i = 0; i &lt; lines.Length; i++)
                  {
                      var line = lines[i].Split(',');
                      var song = new Song() 
                      {
                          Id = int.Parse(line[0]),
                          Artist = line[1], 
                          Title = line[3] 
                      };
                      list.Add(song);
                  }
                  return list;
              }
          }
          public class Song
          {
              public int Id { get; set; }
              public string Title { get; set; }
              public string Artist { get; set; }
          }
      }
  }
  </code></pre>