passing an object into the control property

alanchinese

Regular
Joined
Jan 12, 2005
Messages
62
i created an object and made it as a property of the winform.
then i add a usercontrol which has the same property.
what should i do so that i avoid to create a "New" method to accept the object, "passing" the object visually in the usercontrol's property window?
(currently, that property appears grey in the property window...)
thankx.
 
Define a setter. As long as the property type matches your class, that's all you should need to do.
 
Back
Top