You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have these properties with item type is primitive type
public IList<int> IListOfInt { get; set; }
public List<int> ListOfInt { get; set; }
PropertyGrid is correctly return 'PrimitiveTypeCollectionEditor' as default editor for List<int>. However, for IList<int>, it returns 'CollectionEditor' as the default editor.
I will thought IList<int> should also use 'PrimitiveTypeCollectionEditor', why not?
The text was updated successfully, but these errors were encountered:
Thank you for the request. You are right !
This will be fixed in the next release.
In the meantime, if you have the source code for Toolkit WPF, you can go in file
Xceed.Wpf.Toolkit/Core/Utilities/ListUtilities.cs
In method GetListItemType
and replace
var iListOfT = listType.GetInterfaces().FirstOrDefault(
( i ) => i.IsGenericType && i.GetGenericTypeDefinition() == typeof( IList<> ) );
with:
var iListOfT = ( listType.IsGenericType && ( listType.GetGenericTypeDefinition() == typeof( IList<> ) ) )
? listType
: listType.GetInterfaces().FirstOrDefault( ( i ) => i.IsGenericType && i.GetGenericTypeDefinition() == typeof( IList<> ) );
Hi @XceedBoucherS,
Thanks for the fix on the new release.
While I'm testing it and noticed similar situation with IList<decimal> type, that it defaults with CollectionEditor and not able to make any modifications, is this an expected editor?
But we just made an exception to support the decimal type in IList and use the PrimitiveTypeCollectionEditor.
It will be part of the next release.
Thank you
If I have these properties with item type is primitive type
PropertyGrid is correctly return 'PrimitiveTypeCollectionEditor' as default editor for
List<int>
. However, forIList<int>
, it returns 'CollectionEditor' as the default editor.I will thought
IList<int>
should also use 'PrimitiveTypeCollectionEditor', why not?The text was updated successfully, but these errors were encountered: