473,394 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Another custom property question

I have added a property of custom class type to a control. I can see and set
the property at design time, but nothing is saved.
I have added many other properties of defined types like string, boolean,
etc. And these all work fine.

Here is a sample of my property code...

<Category( "MyProperty" ) > _
Public Property DumbProperty( ) as MyCollection
Get
return some_MyCollection_Object
End Get
Set (ByVal Value as MyCollection )
some_MyCollection_Object = Value
End Set
End Property
What am I missing here? Any ideas or suggestions would be appreciated.
Jul 21 '05 #1
3 1170
I think you need to add DesignerSerializationVisibility attribute, with the
value Visible.

This is because, this is a collection, and needs to be serialized
differently. The designer needs to generate something like:

myObject.DumpProperty.Add(new MyItem())

"cOdEmOnKeY" <cO********@discussions.microsoft.com> wrote in message
news:0E**********************************@microsof t.com...
I have added a property of custom class type to a control. I can see and set the property at design time, but nothing is saved.
I have added many other properties of defined types like string, boolean,
etc. And these all work fine.

Here is a sample of my property code...

<Category( "MyProperty" ) > _
Public Property DumbProperty( ) as MyCollection
Get
return some_MyCollection_Object
End Get
Set (ByVal Value as MyCollection )
some_MyCollection_Object = Value
End Set
End Property
What am I missing here? Any ideas or suggestions would be appreciated.

Jul 21 '05 #2
If I am not mistaken, the designer does not know what your type is, as
it only knows the default types of the .net classes. As a solution, you
should create a type converter. More info:
http://msdn.microsoft.com/library/de...imesupport.asp

Michel van den Berg

cOdEmOnKeY wrote:
I have added a property of custom class type to a control. I can see and set
the property at design time, but nothing is saved.
I have added many other properties of defined types like string, boolean,
etc. And these all work fine.

Here is a sample of my property code...

<Category( "MyProperty" ) > _
Public Property DumbProperty( ) as MyCollection
Get
return some_MyCollection_Object
End Get
Set (ByVal Value as MyCollection )
some_MyCollection_Object = Value
End Set
End Property
What am I missing here? Any ideas or suggestions would be appreciated.

Jul 21 '05 #3
Thank you for your replies...
I think that will get me going in the right direction.

Thanks

"cOdEmOnKeY" wrote:
I have added a property of custom class type to a control. I can see and set
the property at design time, but nothing is saved.
I have added many other properties of defined types like string, boolean,
etc. And these all work fine.

Here is a sample of my property code...

<Category( "MyProperty" ) > _
Public Property DumbProperty( ) as MyCollection
Get
return some_MyCollection_Object
End Get
Set (ByVal Value as MyCollection )
some_MyCollection_Object = Value
End Set
End Property
What am I missing here? Any ideas or suggestions would be appreciated.

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Sheppard | last post by:
Thanks to everyone that responded to my previous Socket Programming question. Now I have run into some behavior that I don't quite understand. Programming environment. VS.NET 2003, C#, Windows...
3
by: cOdEmOnKeY | last post by:
I have added a property of custom class type to a control. I can see and set the property at design time, but nothing is saved. I have added many other properties of defined types like string,...
3
by: | last post by:
Hi all, I have a question on reflection Lets say I have a custom object called Address. Now, lets say I have a string variable that holds the name of a variable in the object such as...
25
by: MuZZy | last post by:
Hi, I'm currently rewriting some functionality which was using multithredaing for retrieving datasets from database and updating a grid control. I found that the grids (Infragistics UltraGrid,...
1
by: Stu | last post by:
Hi, Im using vis studio 2003 and I think wse is out of the question as clients could be using java which doesnt support it. So I managed to find some code which allows you to develop a custom...
9
by: Greger | last post by:
Hi, I am building an architecture that passes my custom objects to and from webservices. (Our internal architecture requires me to use webservices to any suggestion to use other remoting...
1
by: rn5a | last post by:
I want to create a custom control that encapsulates a Button & a TextBox. When the Button is clicked, the user is asked a question using JavaScript confirm (which shows 2 buttons - 'OK' &...
12
by: Ron M. Newman | last post by:
Hi, I can load an assembly using the Assembly.Load(....) However, I'd like dynamic loading of assemblies to be identical to putting an assembly reference in your VS2005 project. and yes, I...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.