문제

I have a list in Propertygrid that opens by expander. I created it using the following site: Customized display of collection data in a PropertyGrid.

I added this Editor Type to cancel the Collection Editor:

class MyEditor: UITypeEditor
{
    public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
    {
        return UITypeEditorEditStyle.None;
    }
}

[TypeConverter(typeof(ExpandableObjectConverter))]
[Editor(typeof(MyEditor), typeof(UITypeEditor))]
public class MyCollection : CollectionBase, ICustomTypeDescriptor
{...}

The problem is you can not edit the values ​​in the collection via the Expander.

I have two questions:

  1. Why the Expander appears as disable editing?

  2. How can I allow the user to edit via Expander?

도움이 되었습니까?

해결책

I found the reason why you can not edit,

because each value in a list is an object you can not edit it,

even though I put in GetValue one value from the object.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top