There is a certain user control. It has a property with a collection of elements of type abstract class MyClass : DependencyObject
There are several inheritors of this class (for example, MyClassEx : MyClass )
So, when I add a new element to the collection in the xaml markup
<MyControl> <MyControl.SomeCollection> <MyClassEx/> </MyControl.SomeCollection> </MyControl> then when all the rules are started, but in the designer mode <MyClassEx/> underlined and when hovering it goes "The specified value cannot be assigned to the collection. The following type is required:" MyClass ".
It is a bit annoying. tell me how to cure? Maybe what attribute is needed for the collection so that xaml allows to use successors in the collection painlessly?
SomeCollection? - VladDSomeCollection : DependencyObject, INotifyCollectionChanged, IList, IList<MyClass>- iRumba[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]? - VladDDependencyObjecttype from theSomeCollectiontypeSomeCollection. I don’t know why ... I don’t have time to figure it out, but if you find a reason, please reply to it - iRumbaObservableCollection<MyClass>. - iRumba