how are you modifying the said properties? you need to broadcast each
change with the designer (raising componentchanging and componentchanged
properly) and this is done automatically if you changed this properties
using the typedescriptor.getproperties method, getting the
propertydescriptor using the propertyname and using the setvalue method. i
don't know the correct syntax but similar to this:
typedescriptor.getproperties(component)["myproperty"].setvalue(component,
newvalue as object)
--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/ [quoted text, click to view] "?eljko Margeta via .NET 247" <anonymous@dotnet247.com> wrote in message
news:ukBMZg0IFHA.572@tk2msftngp13.phx.gbl...
Hi,
I am having a realy annoying problem. I'm creating a custom control, which
uses a complex property named GradientColor. GradientColor class is
consisted of an (int) Angle, (AlphaColor) BeginColor and (AlphaColor)
EndColor.
On the other hand, AlphaColor is another class that consists of an (int)
Alpha and (System.Drawing.Color) Color. I use the AlphaColor class instead
of an System.Drawing.Color structure so that the user could edit the
System.Drawing.Color.A (Alpha) value using a custom UITypeEditor.
My problem is the following. When I change the values of the GradientColor
property in the designer, the nested BeginColor and EndColor properties
(which are also expanded) do not "refresh" properly. The designer's
PropertyGrid shows two (?!) EndColor properties, an a BeginColor property.
It looks as the designer did not "update" itself properly. When I re-expand
the parent or the nested properties, everything looks the way it should.
I am overriding the GetCreateInstanceSupported and CreateInstance methods.
The other thing is that when I expose an AlphaColor property directly from
the control (not nested under GradientColor), it interacts with the designer
normaly.
--------------------------------
From: ?eljko Margeta
-----------------------
Posted by a user from .NET 247 (
http://www.dotnet247.com/)
<Id>YdrIdd9iQ0+UYMcRuEpgrQ==</Id>