Hi Stoitcho
Sorry for the confusion, it's a bit hard to get my requirements down on paper!
The question is how to display an object's property (called MyCollection
say) where the MyCollection property is a class implemented as follows:
class MyCollectionClass : IDictionary<string, MyObjectType>
so that when the object is displayed in the property grid the user can
expand the MyCollection property with say an ellipsis button and then add and
remove objects of the type specified by IDictionary<key, MyObjectType> and
set their values in a manner similar to that had I used List<MyObjectType>
for example.
My current line of attack is as follows:
[Editor(typeof(MyCollectionEditor),
typeof(System.Drawing.Design.UITypeEditor))]
public MyCollectionClass
and then in MyCollectionEditor to the override GetEditStyle and EditValue
and to display a custom form which allows the user to edit the collection and
its contents. The second question therefore is is this approach the right
one in a .NET2 world?
I hope this makes sense.
Marek
> Marek,
>
[quoted text clipped - 22 lines]
> >
> > Marek
Stoitcho Goutsev (100) - 31 Aug 2006 15:49 GMT
Marek,
Have you seen this somewhere in the standard framework controls? If you have
then you can try with the reflector to find out what type of editor
micorosoft guys use. Sometimes it is possible to reuse their. If there is
nothing out of the box I'm afraid you need to write your own as you've
already started.

Signature
Stoitcho Goutsev (100)
> Hi Stoitcho
> Sorry for the confusion, it's a bit hard to get my requirements down on
[quoted text clipped - 60 lines]
>> >
>> > Marek