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 / November 2005

Tip: Looking for answers? Try searching our database.

Force hidden property to serialize at design-time?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Özden Irmak - 07 Nov 2005 13:47 GMT
Hello,

My component has a string type of property which has set "Browsable"
attribute to false...My custom property page does set/get that property and
I want to force it to be serialized into code in Design-Time...

I tried setting various "DesignerSerializationVisibility" atrribute values
to that property but it didn't work...Can anybody help me?

Regards,

Özden
Carlo - 07 Nov 2005 14:30 GMT
Try this:

   Private Function ShouldSerializeMyProperty() As Boolean
     Return True
   End Function

Replace "MyProperty" with the property name of the property you need to be
serialized. This is valid for any type.

HTH

Carlo

-------------------------------------------
Carlo, MCP (Windows Based Applications)
carlodevREMOVE@gmail.com

> Hello,
>
[quoted text clipped - 8 lines]
>
> Özden
Özden Irmak - 07 Nov 2005 20:05 GMT
Hello Carlo,

Thank you very much for the suggestion and it worked...I use lots of
ShouldSerializeXXX for my normal properties but didn't thought that this
will solve my problem, I think I'm working too much nowadays...:)

Thanks again...

Özden

> Try this:
>
[quoted text clipped - 25 lines]
>>
>> Özden

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.