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 / April 2004

Tip: Looking for answers? Try searching our database.

Property not serialized to the runtime initializer.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Norris - 26 Apr 2004 22:17 GMT
Hello, I am designing a control in which the user selects a property that opens an editor.  In the editor, a selection is made from a listbox, and an object (an instance of a class that contains 3 strings) is returned to the property.  The problem is that when the property is set, it is not setting the runtime intializer on the parent form.  I have read some documentation and and tried both using a type converter and overriding the canconvert and convertto methods, and have also tried different combinations of the designerSerializationVisiblity attribute on the property itself.  All I want is for the run-time intializer to give me an new instance of my object with the properties that are set in design time.  Does anyone have experience with this.  Any help would be appreciated.

Sample Intialization Code

mycomponent.myproperty = New Class("ABC", "PDF", "XYZ")

Sample Property

Public Property MyProperty as MyCustomClass
 Get
   return instanceofmycustomclass
 End Get
 Set(byVal Value as MyCustomClass)
   instanceofmycusomclass = value
 End Set
End Property
Palo Mraz - 27 Apr 2004 13:50 GMT
Tim,

If I understand it right, you've to implement a TypeConverter, which can
convert your custom class to an InstanceDescriptor...see
http://msdn.microsoft.com/library/en-us/dndotnet/html/custcodegen.asp?frame=true

Palo
---
http://dact.lamarvin.com/
AutoComplete component for WinForms applications.
Easy to integrate, easier to use!
http://www.vbinfozine.com/
An ordinary VB developer shares his own successes
and failures

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.