Hello,
I am hosting the designer using the 2.0 framework. When a component is added
to the designer form I catch the ComponentAdded event and would like to
change some of the properties of the control. However any properties that I
change do not seem to stick. I have tried direct settings such as
(Button)(e.Component).Text = "this is it";
and also used reflection through a PropertyInfo.SetValue() call. Neither one
worked correctly.
Is there a preferred method to have the property changes "Stick".
Thanks in advance,
Mark
Bernd S - 23 Oct 2006 12:14 GMT
Hi Mark,
I think you have to use PropertyDescriptor.SetValue which uses
IComponentChangeService internally.
> Hello,
>
[quoted text clipped - 12 lines]
> Thanks in advance,
> Mark