title: WPF Listbox not redrawing
body: <p>I have a listbox defined in XAML as:</p>
  
  <pre><code>&lt;ListBox x:Name="directoryList"
                   MinHeight="100" 
                   Grid.Row="0"
                   ItemsSource="{Binding Path=SelectedDirectories}"/&gt;
  </code></pre>
  
  <p>The SelectedDirectories is a property on the lists DataContext of type <code>List&lt;DirectoryInfo&gt;</code></p>
  
  <p>The class which is the datacontext for the listbox implements INotifyPropertyChanged. When the collection changes the items are added successfully to the list however the display does not update until I force the listbox to redraw by resizing it.</p>
  
  <p>Any ideas why?</p>
  
  <p>EDIT: INotifyPropertyChanged implementation</p>
  
  <pre><code>public class FileScannerPresenter : INotifyPropertyChanged
      {
          public event PropertyChangedEventHandler PropertyChanged;
          private FileScanner _FileScanner;
  
          public FileScannerPresenter()
          {
              this._FileScanner = new FileScanner();
          }
  
          public List&lt;DirectoryInfo&gt; SelectedDirectories
          {
              get
              {
                  return _FileScanner.Directories;
              }
          }
  
          public void AddDirectory(string path)
          {
              this._FileScanner.AddDirectory(path);
              OnPropertyChanged("SelectedDirectories");
          }
  
          public void OnPropertyChanged(string property)
          {
              if (this.PropertyChanged != null)
              {
                  PropertyChanged(this, new PropertyChangedEventArgs(property));
              }
          }
      }
  </code></pre>