This commit is contained in:
NaBian committed 2023-06-03 22:05:55 +08:00
1 parent 0d0a5028d1
commit 4206bfd61c
1 file changed
+5
@@ -44,6 +44,11 @@ public class ComboBox : System.Windows.Controls.ComboBox
{
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
{
if (IsReadOnly)
{
return;
}
SetCurrentValue(SelectedValueProperty, null);
SetCurrentValue(SelectedItemProperty, null);
SetCurrentValue(SelectedIndexProperty, -1);