Altough this seems like a stupid question, VS2010 tells mit, that System.Windows.Forms.Design contains only 9 classes, whereas MSDN list 20+.
All I want, is to write the following class(http://msdn.microsoft.com/en-us/library/ms973820.aspx):
public class DragDropControlDesigner : ControlDesigner {
public override void Initialize(IComponent c) {
base.Initialize(c);
((Control)c).AllowDrop = false;
}
}
Project references and user directives don't help. I am even actively using the class with
[Designer("System.Windows.Forms.Design.ParentControlDesigner,
System.Design",
typeof(IDesigner))]
on one of my user controls. I searched for tutorials and on forums for an answer: nothing. Is there someone out there, who has written a custom designer and can tell me how to solve this?
I know i'm very late, but as the second parameter of the DesignerAttribute indicates, this class is in the System.Design assembly. If you add a reference to System.Design, you should see the class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With