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
----------------
[quoted text, click to view] "AlexZh" <lalexzh@yahoo.com> wrote in message
news:1128117377.822574.132870@z14g2000cwz.googlegroups.com...
> 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
>