Winform property

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a winform with a new property. The property type is UserControl.

This is my code fro the property:

private UserControl userControlDetalle;
public UserControl UserControlDetalle
{
get { return userControlDetalle; }
set {
userControlDetalle = value;
if (userControlDetalle != null)
{
...
}
}
}

I have a chield class from this form, and in the properties window I see the
new property, but I can't set a class derived from the UserControl class.

If I modify the property by code it works well.

¿any idea?

--
Saludos,

Alex Bibiano
++++++++++++++++++++++++++
Industrias Laubat, S.A.
Dpto. Informática
 
Inherit a new class from ReferenceConvertor and override the IsValueAllowed
method to allow all objects of type UserControl or dereived from
UserControl. Then apply the class derived from ReferenceConvertor to the
property using the TypeConvertor attribute.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top