all groups > dotnet windows forms designtime > september 2005 >
You're in the

dotnet windows forms designtime

group:

Third-party control property at design time


Third-party control property at design time AlexZh
9/30/2005 2:56:17 PM
dotnet windows forms designtime: 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
Re: Third-party control property at design time Atul
10/11/2005 11:07:01 AM
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]

AddThis Social Bookmark Button