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 / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

Custom control property fails to persist at design time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Harshad Rathod - 05 Dec 2004 19:25 GMT
I have a custom treeview control that has property persistant problem at
design time.  I tested with the following successful/failed senarios.

1) Added simple type properties.  
 That shows up with other properties at design time and I can also set
those at design time that is persisted properly.
2) Added a property P1 of class type T1.  That class is just made up of two
int properties In1 and In2. get and set are there for P1, In1 and In2.
At design time P1 shows up in properties  but is grayed out.  
3) Modified case 2):  If I make P1 an array of T1 then it shows up in
properties and is active with an epsilon button.  Click on and I can set the
properties In1 and In2.  But that is not saved.  It does not persis.

I read somewhere that if a property is of complex type one has to use
ShouldPersist<propertyName>.  I cannot figure out how can I make it persist.  
Help Please !
Signature

Thanks for your help.

Harshad Rathod

Harshad Rathod - 05 Dec 2004 19:29 GMT
I forgot to mention that I also tried with
[        DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]

> I have a custom treeview control that has property persistant problem at
> design time.  I tested with the following successful/failed senarios.
[quoted text clipped - 12 lines]
> ShouldPersist<propertyName>.  I cannot figure out how can I make it persist.  
> Help Please !

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.