all groups > dotnet windows forms designtime > may 2004 >
You're in the

dotnet windows forms designtime

group:

My component does not serialize CollectionBase derived property?


My component does not serialize CollectionBase derived property? Özden Irmak
5/21/2004 4:36:28 PM
dotnet windows forms designtime:
Hi,

I created a new collection class derived from CollectionBase and my
component has a property using this derived class...

Although I marked my derived class as [Serializable], VS.Net designer does
not serialize my component's property?

Anybody has a clue?

Thanks...

Özden

Re: My component does not serialize CollectionBase derived property? Özden Irmak
5/21/2004 6:04:47 PM
Hi Tom,

I tried you suggestion and still having the same problem...

My Structure is like that...

I've a CustomClass derives from Object that is marked as [Serilizable]...

I've a custom CollectioBase derived class that works as a collection for my
CustomClass and this is also marked as [Serilizable]...

And finally my component has a property with the type of my
CustomCollectionDerived class which now is marked also as
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]..
..

Any other suggestion in your mind?

Thanks...

Özden


[quoted text, click to view]

Re: My component does not serialize CollectionBase derived property? Tom McDonnell
5/22/2004 12:02:55 AM
Have you marked the property returning the Collection with the
DesignerSerializationVisibility attribute? Do this and pass it the
Content enum.

[quoted text, click to view]
Re: My component does not serialize CollectionBase derived property? Bob Powell [MVP]
5/22/2004 12:45:26 PM
The objects that you store in your collection must also be serializable.

In addition, the collection class must implement an indexer.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Image transition effects, automatic persistent configuration and
design time mouse operations all in April's issue of Well Formed
http://www.bobpowell.net/wellformed.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://royo.is-a-geek.com/siteFeeder/GetFeed.aspx?FeedId=41





[quoted text, click to view]

AddThis Social Bookmark Button