M
Mark Olbert
I've written a component whose design surface I only want to accept SqlDataAdapters and DataSets. In
other words, if the user attempts to drop any other component on the surface I want to block it (or
remove it).
I've tried a number of different approaches to implementing this kind of behavior, but so far
they've all failed (kudos again to Microsoft for horribly inadequate documentation!) I thought the
way to try to do something like this would be to implement a ComponentDesigner for my component, and
then set methods to react to IComponentChangeService events.
Unfortunately, even though I put the Design() attribute on the component class, and even though the
ComponentDesigner I wrote derives from ComponentDesigner... nothing in ComponentDesigner ever gets
called when I open up the design surface in a component derived from my component.
I'm at a loss trying to understand why none of the methods in my ComponentDesigner class, including
Initialize(), ever get called. Or does the ComponentDesigner do something other than handle the
design-time surface of the component?
- Mark
other words, if the user attempts to drop any other component on the surface I want to block it (or
remove it).
I've tried a number of different approaches to implementing this kind of behavior, but so far
they've all failed (kudos again to Microsoft for horribly inadequate documentation!) I thought the
way to try to do something like this would be to implement a ComponentDesigner for my component, and
then set methods to react to IComponentChangeService events.
Unfortunately, even though I put the Design() attribute on the component class, and even though the
ComponentDesigner I wrote derives from ComponentDesigner... nothing in ComponentDesigner ever gets
called when I open up the design surface in a component derived from my component.
I'm at a loss trying to understand why none of the methods in my ComponentDesigner class, including
Initialize(), ever get called. Or does the ComponentDesigner do something other than handle the
design-time surface of the component?
- Mark