private void OnRemoveItemFromList(RemovableTextControl control) { if (RemoveItem(control.Content)) { List_TL.Controls.Remove(control); } }
public void AddTextToList(string text) { RemovableTextControl newItem = new RemovableTextControl(); newItem.Content = text; newItem.Remove += OnRemoveItemFromList; List_TL.Controls.Add(newItem); }
public void AddItemToList(string s) { if (!AddItem(s)) { return; } //TODO if (true) { RemovableTextControl newItem = new RemovableTextControl(); newItem.Content = s; newItem.Remove += OnRemoveItemFromList; List_TL.Controls.Add(newItem); } }