File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ This program is provided to you under the terms of the Microsoft Public
1414
1515 ***********************************************************************************/
1616
17+ using System . Collections . Generic ;
18+ using System . Linq ;
1719using System . Windows ;
1820
1921namespace Xceed . Wpf . Toolkit . PropertyGrid . Editors
@@ -41,7 +43,12 @@ protected override void ResolveValueBinding( PropertyItem propertyItem )
4143 var type = propertyItem . PropertyType ;
4244 Editor . ItemsSourceType = type ;
4345
44- if ( type . BaseType == typeof ( System . Array ) )
46+ var icollection = propertyItem . PropertyType . GetInterfaces ( ) . FirstOrDefault ( x => x . IsGenericType && x . GetGenericTypeDefinition ( ) == typeof ( ICollection < > ) ) ;
47+ if ( icollection != null )
48+ {
49+ Editor . ItemType = icollection . GetGenericArguments ( ) [ 0 ] ;
50+ }
51+ else if ( type . BaseType == typeof ( System . Array ) )
4552 {
4653 Editor . ItemType = type . GetElementType ( ) ;
4754 }
You can’t perform that action at this time.
0 commit comments