I am trying to get this posted on the MSDN Universal account but have been
unsuccessful so far and have yet to receive an answer to this. Is this
appearing under a MSDN Universal account?
Using the following:
<Designer("MyNamespace.MyDesigner, MyAssembly")> _
Public Class BaseControl
Inherits UserControl
End Class
Public Class DerivedControl
Inherits BaseControl
End Class
Public Class MyDesigner
Inherits ParentControlDesigner
Public Overrides Sub Initialize(ByVal component as IComponent)
MyBase.Initialize(component)
System.Diagnostics.Debugger.Break()
End Sub
End Class
I have the Debugger.Break in the designer Initialize method so that I know
when it activates.
If I drop a BaseControl toolbox item on a form the designer activates fine.
If I drop a DerivedControl toolbox item on a form the designer activates
fine.
My problem is that I want to design DerivedControl directly (not after it's
been dropped on a form), however if I just open the UI view of
DerivedControl the designer is never activated. The DerivedControl should
inherit the designer from BaseControl but just in case I also tried adding
the same <Designer> attribute onto DerivedControl with no success.
What is the problem here?
Thank you.
Robin Sanner
robins@interknowlogy.com
joeycalisay - 11 Mar 2005 02:00 GMT
Your custom designer will not be used when your custom usercontrol is being
designed. VS uses IRootDesigners when design view is being uses, and using
reflector I can only see FormDocumentDesigner (used by forms) and the
UserControlDocumentDesigner (used by usercontrols).

Signature
Joey Calisay
http://spaces.msn.com/members/joeycalisay/
> I am trying to get this posted on the MSDN Universal account but have been
> unsuccessful so far and have yet to receive an answer to this. Is this
[quoted text clipped - 39 lines]
> Robin Sanner
> robins@interknowlogy.com