Collections are commonly used in ContentPropertyAttribute("PropertyName") to define a ContentPropertyAttribute("PropertyName") in a custom class, where the PropertyName usually IList or IList<T> .
[ContentProperty(SomeProp)] class SomeClass {
However, if the class does not provide a value for ContentPropertyAttribute and implements any interface of type IList<T> , IList , ICollection<T> or ICollection , the property of the name "Items" (if present, and if the corresponding type, for example IList ), is automatically detected through reflection (for population purposes via xaml), and this is the case with the Collection<T> class.
You can even check the class in Reflector to make sure it does not have a content property.
Collection<T> class has this property
protected IList<T> Items { get { return _items; } }
and adding something similar to your collection type (even if this property is protected) is enough for it to behave as desired in xaml.
I believe that the behavior is implemented this way for backward compatibility.
source share