Hi Laurent,
Frankly I haven't written web controls but in WindowsForms controls (and I
believe it goes for web too) in order to play nicely with the designer you
should notify for any the changes of the control in order property browser
to be refreshed accordingly and Undo/Redo to work. You can do that in two
ways.
1. When you change a property you should call IComponentChangeService's
OnComponentChanging and OnComponentChanged.
-or-
2. (This is what I sugges) to change the propties not directly, but via
PorpertyDescriptor obtained from components TypeDescriptor. This will take
kare of all notifications for you.
--
HTH
Stoitcho Goutsev (100) [C# MVP]
"Laurent Liegeois" <ll*@lli.be> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Hi,
I try to write a Web Custom Control. But I have a little problem for
refreshing the properties view of my Web Control in Visual Studio ().
When I modify the value of text property of my Control by programing, it
changes in the Design view but no in properties viewAnd when in the
design view, I lost the focus and I click above my control. It is
refreshed and text property contains the good value.
Therefore how I refresh properties views programmatically
In fact I look for a method similar to
ControlDesigner.UpdateDesignTimeHtml() for properties view in VS.
Thank you in advance for your help.
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!