feat: implement MaxCount constraint.

This commit is contained in:
rabbitism
2024-06-23 16:51:56 +08:00
parent 847a44e168
commit 91633402fb

View File

@@ -272,6 +272,7 @@ public class TagInput : TemplatedControl
private void AddTags()
{
if (!(_textBox.Text?.Length > 0)) return;
if (Tags.Count >= MaxCount) return;
string[] values;
if (!string.IsNullOrEmpty(Separator))
values = _textBox.Text.Split(new[] { Separator },