feat: replace ItemsControl with MultiComboBoxSelectedItemList and add Remove command for selected items

This commit is contained in:
rabbitism
2025-09-14 21:47:31 +08:00
parent 298cc5db8b
commit 609607f68a
2 changed files with 15 additions and 14 deletions

View File

@@ -1879,6 +1879,15 @@ public partial class MultiAutoCompleteBox : TemplatedControl, IInnerContentContr
}
}
public void Remove(object? o)
{
if (o is not StyledElement s) return;
if (SelectedItems?.Contains(s.DataContext) == true)
{
SelectedItems.Remove(s.DataContext);
}
}
// TODO12: Remove, this shouldn't be part of the public API. Use our internal BindingEvaluator instead.
/// <summary>
/// A framework element that permits a binding to be evaluated in a new data