Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / May 2004

Tip: Looking for answers? Try searching our database.

My component does not serialize CollectionBase derived property?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
?zden Irmak - 21 May 2004 14:36 GMT
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
Tom McDonnell - 21 May 2004 15:32 GMT
Have you marked the property returning the Collection with the
DesignerSerializationVisibility attribute? Do this and pass it the
Content enum.

> Hi,
>
[quoted text clipped - 9 lines]
>
> Özden
?zden Irmak - 21 May 2004 16:04 GMT
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

> Have you marked the property returning the Collection with the
> DesignerSerializationVisibility attribute? Do this and pass it the
[quoted text clipped - 13 lines]
> >
> > ?zden
Bob Powell [MVP] - 22 May 2004 11:45 GMT
The objects that you store in your collection must also be serializable.

In addition, the collection class must implement an indexer.

Signature

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

> Hi Tom,
>
[quoted text clipped - 9 lines]
> And finally my component has a property with the type of my
> CustomCollectionDerived class which now is marked also as

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]..
> .
>
[quoted text clipped - 22 lines]
> > >
> > > ?zden

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.