Groups | Blog | Home
all groups > vb.net controls > april 2005 >

vb.net controls : User Component and Collection handling


Joop Muis
4/25/2005 12:00:00 AM
Hi,

I'm trying to write a simple user component that handles a stringcollection.
I have looked at some examples and created a stringcollection and made it
accessible in the designer. The designer shows a collection and opens the
collection editor and lets me enter new values, however when I store the
program and compile it the contents of my collection is gone again. In the
generated sourcecode there is no trace of my collection. The code I'm using
is as follows:

<Browsable(True), Category("Extra"), Description("SearchBy"),
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.
DesignerSerializationVisibility.Content)> _
Public Property SearchBy() As IndexStringCollection
Get
Return CType(Me._SearchBy, IndexStringCollection)
End Get
Set(ByVal Value As IndexStringCollection)
Me._SearchBy = Value
End Set
End Property

I guess I'm doing something wrong, but the question is: What???

I'm using VS2003 Enterprise Architect.



Thanks

Joop Muis
4/27/2005 12:00:00 AM
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)>

did the trick

"Joop Muis" <joop.muis@hccnet.nl_nospam> schreef in bericht
news:OERDBrWSFHA.164@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button