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 / .NET Framework / CLR / October 2003

Tip: Looking for answers? Try searching our database.

Making Component descendant to stream embeded properties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Doychin Bondzhev - 13 Oct 2003 13:30 GMT
I have one class that descends from Component which has few public propertis
where some of them are also objects with their own public properties.

The problem is that when I create in VS new descendand of this class and
open it in component desinger the only properties that are streamed are
those which are of simple types like String, Integer and so on. But all
object type properties that have their properties pblic are not stream
I have converter class and all attributes are set. ConvertTo method is
called for this ocnvertor calss but code for initializing these propeties is
not genrated in source code.

Any ideas what I have to do in order to make this thing to work?

Thanks in advance.

Doychin
Peter Koen - 13 Oct 2003 22:05 GMT
> I have one class that descends from Component which has few public
> propertis where some of them are also objects with their own public
> properties.

Take a look at these properties:

in the parent class:
[PersistenceMode(PersistenceMode.InnerProperty),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]

in the embedded class:
[NotifyParentProperty(true)]

that should help you to fix your problem.

Signature

best regards

Peter Koen
-----------------------------------
MCAD, CAI/R, CAI/S, CASE/RS, CAT/RS
http://www.kema.at

Doychin Bondzhev - 14 Oct 2003 07:52 GMT
I tryed these attributes but they are ASP.NET specific which means I can't
use them in regular componenets only wiht ASP.NET which will be managed by
ASP.NET designer.

from what I see and read it looks like thi is not supported by the standard
serializer that is used to serialize componets in component desinger.

and probably in this case I will have to write my own serializer to supporte
object type properties into components.

and it is som simple to achive this in Delphi for example ;-(
all that stuff with attributes and type converters and all these special
serializers to support such simple think as property of type any object wiht
other public propeties inside it.

This is supported only for controls from what I see.

Doychin

> > I have one class that descends from Component which has few public
> > propertis where some of them are also objects with their own public
[quoted text clipped - 10 lines]
>
> that should help you to fix your problem.

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.