I'm trying to add a new item to the listbox everytime I press the add button but for some reason it only adds the first one, and if I press it again, it doesnt add the second one.
How I am seeing the code right now is that I create a new list named _items and then I add what ever is in my textbox everytime I press the button then I update the ItemSource aswell.
How do I make it add a new item everytime I press the AddBtn?
List<string> _items = new List<string>();
private void addBtn_Click(object sender, RoutedEventArgs e)
{
_items.Add(recipentTextbox.Text);
recipientLb.ItemsSource = _items;
}