VS2005 B2 - CollectionEditor + EditorAttribute problem

  • Thread starter Thread starter Daniel Mihaita
  • Start date Start date
D

Daniel Mihaita

Hello,
I have a simple issue : a collection class MyItems , derived from
CollectionBase, an editor class MyItemsEditor derived from
CollectionEditor, and a property DataItems of type MyItems, declared as :

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Editor(typeof(MyItemsEditor), typeof(UITypeEditor))]
public MyItems DataItems{
get { return _DataItems; }
set { _DataItems = value; }
}

Compiled with VS2003 it works OK. When I switched to 2005B2, the
problem is that in PropertyGrid it doesn't show anymore the ellipsis
button only if I declare the EditorAttribute as it follows:
[Editor(typeof(MyItemsEditor), typeof(MyItemsEditor))]

The problem is my MyItemsEditor has overriden the method
CreateNewItemTypes, so I should be able to add more types of object to
MyItems (derived from the same base class). In 2003 is working ok, in VS
2005 B2 it is not working anymore.

Anybody has a clue ?

Regards,
DM
 
Daniel Mihaita said:
Hello,
I have a simple issue : a collection class MyItems , derived from
CollectionBase, an editor class MyItemsEditor derived from
CollectionEditor, and a property DataItems of type MyItems, declared as :

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Editor(typeof(MyItemsEditor), typeof(UITypeEditor))]
public MyItems DataItems{
get { return _DataItems; }
set { _DataItems = value; }
}

Compiled with VS2003 it works OK. When I switched to 2005B2, the problem
is that in PropertyGrid it doesn't show anymore the ellipsis button only
if I declare the EditorAttribute as it follows:
[Editor(typeof(MyItemsEditor), typeof(MyItemsEditor))]

The problem is my MyItemsEditor has overriden the method
CreateNewItemTypes, so I should be able to add more types of object to
MyItems (derived from the same base class). In 2003 is working ok, in VS
2005 B2 it is not working anymore.

Anybody has a clue ?

Regards,
DM


Please post to the Beta2 forum http://forums.microsoft.com/msdn/ , this NG
is for the released product only, you might also file an issue in
http://lab.msdn.microsoft.com/productfeedback/default.aspx


Willy.
 
Back
Top