Hi all,
I am trying to associate a simple custom designer with an equally simple
windows form. Here is what I have:
public class MyDesigner : DocumentDesigner {
public override DesignerVerbCollection Verbs {
get {
DesignerVerbCollection c = base.Verbs;
c.Add(new DesignerVerb("MYVERB", new EventHandler(EH)));
return c;
}
}
private void EH(object sender, EventArgs e) {
MessageBox.Show("MY VERB!");
}
}
[Designer(typeof(MyDesigner), typeof(IRootDesigner)),
DesignerCategory("Form")]
public class Form1 : System.Windows.Forms.Form {
<snip>
}
At runtime I can report on the attribute value and see the correct result
(ie. it says my designer is in use). However, I can't see the new verb when
I am in the design view for Form1. What am I doing wrong?
TIA,
Kent
Stoitcho Goutsev \(100\) [C# MVP] - 12 May 2004 21:35 GMT
Hi Kent,
VS will use your designer when you design a form that inherits from Form1.
For Form1 it uses the normal Form designer.

Signature
Stoitcho Goutsev (100) [C# MVP]
> Hi all,
>
[quoted text clipped - 27 lines]
> TIA,
> Kent
Kent Boogaart - 14 May 2004 12:19 GMT
Ah, thanks - now I get it.
> Hi Kent,
>
[quoted text clipped - 33 lines]
> > TIA,
> > Kent