feat: update dependency, simplify code, remove navigation control.

This commit is contained in:
rabbitism
2024-02-25 18:00:08 +08:00
parent a948481f62
commit 6ef16d2ec7
19 changed files with 19 additions and 997 deletions

View File

@@ -37,7 +37,7 @@ public class EnumSelector: TemplatedControl
if (o is not EnumSelector selector) return null;
if (value is null) return null;
if (value.GetType() != selector.EnumType) return null;
var first = selector.Values.FirstOrDefault(a => Equals(a.Value, value));
var first = selector.Values?.FirstOrDefault(a => Equals(a.Value, value));
if (first is null) return null;
return value;
}