feat: add warning, resolve a crash issue.

This commit is contained in:
rabbitism
2024-07-30 01:01:27 +08:00
parent f7dc4d356c
commit cbc17123ae
2 changed files with 5 additions and 1 deletions

View File

@@ -92,7 +92,10 @@ public class EnumSelector: TemplatedControl
var newValue = args.NewValue.Value;
if (newValue is null)
{
SetCurrentValue(SelectedValueProperty, null);
if (Values?.Any() == true)
{
SetCurrentValue(SelectedValueProperty, null);
}
}
else
{