Hi,
I have a problem with changing properties of a third-party control at
design time when the control is encapsulated into my own user control.
I have a third-party control (TPControl) that allows me to change
properties at design time. I mean, if the control is dropped on a form
and some properties are changed in PropertyGrid atg design time all the
changes are persistent (some code lines are generated).
Different result when I use this control encapsulated into my
UserControl.
I create my own UserControl (MyUC) and encapsulate this third-party
control in my UserControl (by dropping it on UserControl). I manually
create a property that exposes this third-party control.
private TPControl tpControl;
public TPControl TheTPControl
{
get
{
return tpControl;
}
}
I drop my UserControl on a form.
When I open PropertyGrid for my UserControl being set on a form I can
expand the property item (TheTPControl), which is responsible for
third-party control. PropertyGrid allows me to change any value for
that third-party control, but these changes are not persistent. I mean,
after project is rebuild all the changes are lost, no code lines are
generated.
Any ideas?
Thank you,
Alex Zhitlenok
Atul - 11 Oct 2005 06:37 GMT
Make sure you have set DesignerSerializibiltyAttribute to Content for the
TheTPControl property.
----------------
-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
----------------
> Hi,
>
[quoted text clipped - 33 lines]
> Thank you,
> Alex Zhitlenok