title: How to scroll to the bottom of listbox c#
body: <p>I know that this was asked before many times but here is the problem. I wan't to add a lot of items to the listbox, scroll to the bottom and focus textbox. I tried to use</p>
  
  <pre><code>MyListBox.SelectedItem = = MyListBox.Items[MyListBox.Items.Count - 1];
  </code></pre>
  
  <p>but it selects last item and it won't focus textbox. I also tried to clear listbox selection by setting it to null but then it returns scroll bar to the top. I also tried to do all of this with listbox.SelectedIndex and later set it to -1 but it gives me the same problem.</p>