title: How to bind ItemsSource to ObservableCollection Property of the parent Window?
body: <p>I know this has been asked times before but none of the solutions so far works for me. I try to bing an <code>ObservableCollection</code> to the <code>ItemsSource</code> propery of a combobox but fail miserably.</p>
  
  <p>The ObservalbeCollection is part of the Window.cs:</p>
  
  <pre><code>public partial class RecordSoundWindow2 : Window
  {
      public ObservableCollection&lt;string&gt; RecordingDevices { get; set; }
  
      public RecordSoundWindow2()
      {
          InitializeComponent();
      }
  
      private void Window_Loaded(object sender, RoutedEventArgs e)
      {
          RecordingDevices = new ObservableCollection&lt;string&gt;();
  
          for (int n = 0; n &lt; WaveIn.DeviceCount; n++)
          {
              RecordingDevices.Add(WaveIn.GetCapabilities(n).ProductName);
          }
      }
  </code></pre>
  
  <p>I certainly know that it gets updated with my microphone name, but the combobox never shows its contents. I've tried the following approaches so far:</p>
  
  <pre><code>&lt;ComboBox DockPanel.Dock="Top" Name="cbDevices" ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Path=RecordingDevices}"/&gt;
  &lt;ComboBox DockPanel.Dock="Top" Name="cbDevices" ItemsSource="{Binding RelativeSource={RelativeSource Self}, Path=RecordingDevices}"/&gt;
  &lt;ComboBox DockPanel.Dock="Top" Name="cbDevices" ItemsSource="{Binding Path=RecordingDevices}"/&gt;
  </code></pre>
  
  <p>I've seen many answers where the <code>RealtiveSource</code> with <code>FindAncestor</code> works, but not for me. What am I missing here?</p>