修复标签输入框BUG
解决控件在VM绑定是照成的newTags和oldTags空值以及下标越界问题
This commit is contained in:
@@ -143,10 +143,12 @@ public class TagInput : TemplatedControl
|
||||
{
|
||||
Items.RemoveAt(Items.Count - 1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < newTags.Count; i++)
|
||||
if (newTags != null)
|
||||
{
|
||||
Items.Insert(Items.Count - 1, newTags[i]);
|
||||
for (int i = 0; i < newTags.Count; i++)
|
||||
{
|
||||
Items.Add(newTags[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (oldTags is INotifyCollectionChanged inccold)
|
||||
|
||||
Reference in New Issue
Block a user