title: WPF/C# Binding custom object list data to a ListBox?
body: <p>I've ran into a bit of a wall with being able to bind data of my custom object list to a <code>ListBox</code> in WPF.</p>
  
  <p>This is the custom object:</p>
  
  <pre><code>public class FileItem
  {
      public string Name { get; set; }
      public string Path { get; set; }
  }
  </code></pre>
  
  <p>And this is the list:</p>
  
  <pre><code>private List&lt;FileItem&gt; folder = new List&lt;FileItem&gt;();
  public List&lt;FileItem&gt; Folder { get { return folder; } }
  </code></pre>
  
  <p>The list gets populated and maintained by a <code>FileSystemWatcher</code> as files get moved around, deleted, renamed, etc.  All the list does is keeps tracks of names and paths.</p>
  
  <p>Here's what I have in the MainWindow code-behind file (it's hard coded for testing purposes for now):</p>
  
  <pre><code>FolderWatcher folder1 = new FolderWatcher();
  folder1.Run(@"E:\MyApp\test", "*.txt");
  
  listboxFolder1.ItemsSource = folder1.Folder;
  </code></pre>
  
  <p>Here's my XAML portion:</p>
  
  <pre><code>&lt;ListBox x:Name="listboxFolder1" Grid.Row="1" BorderThickness="0" 
           ItemsSource="{Binding}"/&gt;
  </code></pre>
  
  <p>Unfortunately, the only thing that gets displayed is <code>MyApp.FileItem</code> for every entry.  How do I display the specific property such as name?</p>