The EditorAttribute is ignored if a property is marked read only. This might be appropriate for some field but is definitely not workable for collections. Collections are often readonly from a property perspective (they do not have a setter) but their content is definitely not read only.
I would suggest that if an editor attribute has been applied to a field it should be left up to the editor to choose how to deal with read only content. It is given the property item/descriptor/etc so it can easily choose to use a TextBlockEditor if needed.
If compatibility is a concern then an alternative would be to design a new interface to allow the editor class type control over readonly field separately from the current one. The code would try to get the new interface -- if not available it would use the current behavior.
Comments: ** Comment from web user: BoucherS **
I would suggest that if an editor attribute has been applied to a field it should be left up to the editor to choose how to deal with read only content. It is given the property item/descriptor/etc so it can easily choose to use a TextBlockEditor if needed.
If compatibility is a concern then an alternative would be to design a new interface to allow the editor class type control over readonly field separately from the current one. The code would try to get the new interface -- if not available it would use the current behavior.
Comments: ** Comment from web user: BoucherS **
This will be fixed in v2.5.
When using EditorAtttribute on a readOnly property (only set), it won't default to a TextBlock...unless the editor.IsEnabled is set to False in ITypeEditor.ResolveEditor(). In that case, the editor won't be enabled.