Designer Property Serialization -- Sycning inner properties to designer property window
I am just getting started developing custom user controls, and I am
having issues keep the inner properties of nested controls in sync
with the properties in the designer window. When I change a property
of a nested control in the properties window, the designer does not
automatically redraw itself. If I switch to HTML Mode and then return
to design mode, the control is redrawn. But If I switch back to HTML
Mode the inner properties are not updated.
However, If I change a property of my custom control or the font-bold
property of the nested control in the design window, the nested
control is refreshed and the inner properties are correctly updated.
How do I keep the two in sync? Am I missing something here? Do I
need to implement a TypeConverter and set NotifyParentProperty(True)
to keep the designer in sync with the properties window. If I do, how
can I implement one for web controls as I will have several controls
and do not feel like coding a wrapper for every property of every
control on the page. Or, is there some why to manually fire the event
that is raised when the nested control's font-bold is changed in the
Also, what is the difference between refresh.repaint and refresh.all.
Does one only redraw the control on the designer while the other
recreates the controls properties and then redraws the control on the
Here is my code in the simplest form. Thanks for the help in
<Assembly: TagPrefix("Editor", "cms")>
System.Design"), DefaultProperty("Text"), ToolboxData("<cms:Editor
RefreshProperties(RefreshProperties.Repaint)> Public Class Editor
Dim _text As String
<Bindable(True), Category("Appearance"), DefaultValue("")>
Property [Text]() As String
Set(ByVal Value As String)
_text = Value
Private _TitleLabel As Label
Public Property [TitleLabel]() As Label
Set(ByVal Value As Label)
_TitleLabel = Value
Me.ChildControlsCreated = False
|All times are GMT. The time now is 07:52 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.