mscorlib(4.0.0.0) API with additions
DesignerVerb.cs
4 
6 {
8  [ComVisible(true)]
9  [HostProtection(SecurityAction.LinkDemand, SharedState = true)]
10  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
11  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
12  public class DesignerVerb : MenuCommand
13  {
16  public string Description
17  {
18  get
19  {
20  object obj = Properties["Description"];
21  if (obj == null)
22  {
23  return string.Empty;
24  }
25  return (string)obj;
26  }
27  set
28  {
29  Properties["Description"] = value;
30  }
31  }
32 
35  public string Text
36  {
37  get
38  {
39  object obj = Properties["Text"];
40  if (obj == null)
41  {
42  return string.Empty;
43  }
44  return (string)obj;
45  }
46  }
47 
51  public DesignerVerb(string text, EventHandler handler)
52  : base(handler, StandardCommands.VerbFirst)
53  {
54  Properties["Text"] = ((text == null) ? null : Regex.Replace(text, "\\(\\&.\\)", ""));
55  }
56 
61  public DesignerVerb(string text, EventHandler handler, CommandID startCommandID)
62  : base(handler, startCommandID)
63  {
64  Properties["Text"] = ((text == null) ? null : Regex.Replace(text, "\\(\\&.\\)", ""));
65  }
66 
69  public override string ToString()
70  {
71  return Text + " : " + base.ToString();
72  }
73  }
74 }
DesignerVerb(string text, EventHandler handler, CommandID startCommandID)
Initializes a new instance of the T:System.ComponentModel.Design.DesignerVerb class.
Definition: DesignerVerb.cs:61
DesignerVerb(string text, EventHandler handler)
Initializes a new instance of the T:System.ComponentModel.Design.DesignerVerb class.
Definition: DesignerVerb.cs:51
override string ToString()
Overrides M:System.Object.ToString.
Definition: DesignerVerb.cs:69
Represents a unique command identifier that consists of a numeric command ID and a GUID menu group id...
Definition: CommandID.cs:12
Definition: __Canon.cs:3
Represents a verb that can be invoked from a designer.
Definition: DesignerVerb.cs:12
static string Replace(string input, string pattern, string replacement)
In a specified input string, replaces all strings that match a specified regular expression with a sp...
Definition: Regex.cs:826
SecurityAction
Specifies the security actions that can be performed using declarative security.
string Text
Gets the text description for the verb command on the menu.
Definition: DesignerVerb.cs:36
string Description
Gets or sets the description of the menu item for the verb.
Definition: DesignerVerb.cs:17
delegate void EventHandler(object sender, EventArgs e)
Represents the method that will handle an event that has no event data.
Defines identifiers for the standard set of commands that are available to most applications.
Represents a Windows menu or toolbar command item.
Definition: MenuCommand.cs:13
virtual IDictionary Properties
Gets the public properties associated with the T:System.ComponentModel.Design.MenuCommand.
Definition: MenuCommand.cs:66
Represents an immutable regular expression.To browse the .NET Framework source code for this type,...
Definition: Regex.cs:16