title: WPF Combobox current scroll position does not change
body: <p>I have a public property of type <code>ObservableCollection&lt;ClassName&gt;</code> in the code behind file and i have bound this to the ItemsSource property of the Combobox.</p>
  
  <pre><code>&lt;ComboBox Height="23" 
                    Margin="82,34,71,0" 
                    Name="comboBox1" 
                    VerticalAlignment="Top"
                    ItemsSource="{Binding Path=Collection}"
                    DisplayMemberPath="Name" /&gt;
  </code></pre>
  
  <p>After i populate this collection on form load, all the items are shown and i scroll down to the last element and select it.</p>
  
  <p>Now , i click on a button, which will add another item to the collection and i want to set the cursor to the beginning of the list. For this, i tried the following code,</p>
  
  <pre><code>    private void button1_Click(object sender, RoutedEventArgs e)
      {
          Collection.Add(new TempObject() { Name = "new item" });
          comboBox1.SelectedIndex = -1;
      }
  </code></pre>
  
  <p>Doing this does not set the scroll bar to the beginning of the list. I tried clearing the list and populating it again but it still didn't work.</p>
  
  <p>help please....</p>
  
  <p>After applying BringIntoView :</p>
  
  <pre><code> private void button1_Click(object sender, RoutedEventArgs e)
          {
              Collection.Clear();
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
              Collection.Add(new TempObject() { Name = "testItem" });
  
              comboBox1.SelectedIndex = -1;
  
              ComboBoxItem item = comboBox1.ItemContainerGenerator.ContainerFromIndex(0) 
                                                                         as ComboBoxItem;
  
              if (item != null) item.BringIntoView();
       }
  </code></pre>
  
  <p>This will always return null for the ComboBoxItem item.</p>