Why would I be using WinForm? I know what your project is in. :P
Originally Posted by Jpp
That's all I need. A source with the bug happening. Looking at it now.
As far as I can tell, the listbox isn't clearing because you're adding more into the listbox as soon as it tries to clear. That seems to be the duplication problem there.
So, why not do something like this?
Only problem with this is somehow SelectionChanged is calling twice sometimes, but it works.
private void MainTabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
var item = sender as TabControl;
if (item.SelectedIndex == 1)
if (listBox01.Items.Count > 0)