diff --git a/src/Ursa/Controls/TagInput/TagInput.cs b/src/Ursa/Controls/TagInput/TagInput.cs index 920f01c..7b93b26 100644 --- a/src/Ursa/Controls/TagInput/TagInput.cs +++ b/src/Ursa/Controls/TagInput/TagInput.cs @@ -165,10 +165,14 @@ public class TagInput : TemplatedControl { var newTags = args.GetNewValue>(); var oldTags = args.GetOldValue>(); - for (int i = 0; i < Items.Count - 1; i++) + + // remove all tags except the textbox + int count = Items.Count; + for (int i = 0; i < count - 1; i++) { - Items.RemoveAt(Items.Count - 1); + Items.RemoveAt(0); } + if (newTags != null) { for (int i = 0; i < newTags.Count; i++)