diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs index 8d79663fb0d..a56a34277a0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs @@ -57,15 +57,10 @@ public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) /// TypeConverter.StandardValuesCollection public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { - if (_standardValues == null) + return _standardValues ??= new TypeConverter.StandardValuesCollection(new Nullable[] { - ArrayList list1 = new ArrayList(3); - list1.Add((bool?)true); - list1.Add((bool?)false); - list1.Add((bool?)null); - _standardValues = new TypeConverter.StandardValuesCollection(list1.ToArray()); - } - return _standardValues; + true, false, null + }); } ///