There are several approaches and designs. I would refer your question to UX Stack Exchanges
One way is to have a single TextBox
with an "Add" button and to have a ListBox
(or other similar container), so user can click the Add button to add items to the ListBox
.
Something like this:
So in this case you would only enable the "Add" button if the data is valid, then when user click "Add", you should add the TextBox.Text
to ListBox
and then clear the TextBox.Text
.
Clicking "OK" will eventually take the data from the ListBox
and do whatever you needs.
Of course there are many other approaches, I think this one is pretty basic and intuitive.