Bare minimum for a designer -
04-21-2004
, 01:01 AM
I've looked in depth at the ShapeDesigner
(http://windowsforms.net/articles/shapedesigner.aspx) example and have
succesfully made some changes to it.
I decided I wanted to start my own designer from scratch so I understood
things a bit better and though I've followed the code from ShapeDesigner I
can never see a designer attached to my classes.
I've added the [Designer...]atribute to my class, for now I only have a root
designer - do I need both root and regular?
I've defined the root designer like the Shape one only much simpler. I
didn't use IToolboxUser and I'm using the base class implementation for
everything. I copied the IRootDesigner methods from ShapeDesigner and
created a DesignerView with a very simple paint event.
From my reading those seem like the bare minimum to see a design surface -
it won't do anything but I should see the text from my paint event.
Its pretty obvious that my class is ignoring the [Designer...] attribute but
there's no errors - it all compiles. I guess I'm missing something real
important.
Any help appreciated, otherwise I guess I'm going to start chopping things
out of the ShapeDesigner to find the minimum required.
Zman |