Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
648 lines (613 sloc) 36.1 KB
<Type Name="MenuCommand" FullName="System.ComponentModel.Design.MenuCommand">
<TypeSignature Language="C#" Value="public class MenuCommand" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MenuCommand extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.ComponentModel.Design.MenuCommand" />
<TypeSignature Language="VB.NET" Value="Public Class MenuCommand" />
<TypeSignature Language="C++ CLI" Value="public ref class MenuCommand" />
<TypeSignature Language="F#" Value="type MenuCommand = class" />
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a Windows menu or toolbar command item.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.ComponentModel.Design.MenuCommand> class represents information about a Windows menu or toolbar command. The <xref:System.ComponentModel.Design.IMenuCommandService> interface allows you to add <xref:System.ComponentModel.Design.MenuCommand> objects to the Visual Studio menu.
This class provides the following members:
- An event-handler property to which you can attach an event handler for the command.
- A <xref:System.ComponentModel.Design.CommandID> property that uniquely identifies the command.
- An <xref:System.ComponentModel.Design.MenuCommand.Invoke%2A> method that executes the command.
- An <xref:System.ComponentModel.Design.MenuCommand.OnCommandChanged%2A> method that can be overridden to handle the event that occurs when a new command is selected.
- Boolean flag states that indicate whether the command is <xref:System.ComponentModel.Design.MenuCommand.Checked%2A>, <xref:System.ComponentModel.Design.MenuCommand.Enabled%2A>, <xref:System.ComponentModel.Design.MenuCommand.Supported%2A>, or <xref:System.ComponentModel.Design.MenuCommand.Visible%2A>.
- An <xref:System.ComponentModel.Design.MenuCommand.OleStatus%2A> property that indicates the OLE command status code for the command.
- An override for the <xref:System.ComponentModel.Design.MenuCommand.ToString%2A> method.
## Examples
The following code example creates a <xref:System.ComponentModel.Design.MenuCommand> object, configures its properties, and adds it to the <xref:System.ComponentModel.Design.IMenuCommandService>.
Create an instance of the `Component1` class on your form and open the form in a design environment like Visual Studio. Press the F1 key to invoke the <xref:System.ComponentModel.Design.MenuCommand>.
[!code-cpp[MenuCommand Example#10](~/samples/snippets/cpp/VS_Snippets_Winforms/MenuCommand Example/CPP/component1.cpp#10)]
[!code-csharp[MenuCommand Example#10](~/samples/snippets/csharp/VS_Snippets_Winforms/MenuCommand Example/CS/component1.cs#10)]
[!code-vb[MenuCommand Example#10](~/samples/snippets/visualbasic/VS_Snippets_Winforms/MenuCommand Example/VB/component1.vb#10)]
]]></format>
</remarks>
<permission cref="T:System.Security.NamedPermissionSet">for full access to system resources. Demand values: <see cref="F:System.Security.Permissions.SecurityAction.LinkDemand" />, <see cref="F:System.Security.Permissions.SecurityAction.InheritanceDemand" />. Associated state:</permission>
<altmember cref="T:System.ComponentModel.Design.StandardCommands" />
<altmember cref="T:System.ComponentModel.Design.IMenuCommandService" />
<altmember cref="T:System.ComponentModel.Design.CommandID" />
<related type="Article" href="https://msdn.microsoft.com/library/0bad6816-922a-4845-b8e3-50e91ec60f13">Designer Commands and the DesignerAction Object Model for Windows Forms</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public MenuCommand (EventHandler handler, System.ComponentModel.Design.CommandID command);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.EventHandler handler, class System.ComponentModel.Design.CommandID command) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.Design.MenuCommand.#ctor(System.EventHandler,System.ComponentModel.Design.CommandID)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (handler As EventHandler, command As CommandID)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; MenuCommand(EventHandler ^ handler, System::ComponentModel::Design::CommandID ^ command);" />
<MemberSignature Language="F#" Value="new System.ComponentModel.Design.MenuCommand : EventHandler * System.ComponentModel.Design.CommandID -&gt; System.ComponentModel.Design.MenuCommand" Usage="new System.ComponentModel.Design.MenuCommand (handler, command)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="handler" Type="System.EventHandler" />
<Parameter Name="command" Type="System.ComponentModel.Design.CommandID" />
</Parameters>
<Docs>
<param name="handler">The event to raise when the user selects the menu item or toolbar button.</param>
<param name="command">The unique command ID that links this menu command to the environment's menu.</param>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.MenuCommand" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example creates a <xref:System.ComponentModel.Design.MenuCommand> object, configures its properties, and adds it to an <xref:System.ComponentModel.Design.IMenuCommandService> object.
[!code-cpp[MenuCommand Example#1](~/samples/snippets/cpp/VS_Snippets_Winforms/MenuCommand Example/CPP/component1.cpp#1)]
[!code-csharp[MenuCommand Example#1](~/samples/snippets/csharp/VS_Snippets_Winforms/MenuCommand Example/CS/component1.cs#1)]
[!code-vb[MenuCommand Example#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/MenuCommand Example/VB/component1.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.Design.IMenuCommandService" />
<altmember cref="T:System.ComponentModel.Design.CommandID" />
</Docs>
</Member>
<Member MemberName="Checked">
<MemberSignature Language="C#" Value="public virtual bool Checked { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Checked" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.MenuCommand.Checked" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Checked As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool Checked { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Checked : bool with get, set" Usage="System.ComponentModel.Design.MenuCommand.Checked" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether this menu item is checked.</summary>
<value>
<see langword="true" /> if the item is checked; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CommandChanged">
<MemberSignature Language="C#" Value="public event EventHandler CommandChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler CommandChanged" />
<MemberSignature Language="DocId" Value="E:System.ComponentModel.Design.MenuCommand.CommandChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event CommandChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ CommandChanged;" />
<MemberSignature Language="F#" Value="member this.CommandChanged : EventHandler " Usage="member this.CommandChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the menu command changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A command can change if it becomes checked or disabled.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CommandID">
<MemberSignature Language="C#" Value="public virtual System.ComponentModel.Design.CommandID CommandID { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ComponentModel.Design.CommandID CommandID" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.MenuCommand.CommandID" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property CommandID As CommandID" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::ComponentModel::Design::CommandID ^ CommandID { System::ComponentModel::Design::CommandID ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CommandID : System.ComponentModel.Design.CommandID" Usage="System.ComponentModel.Design.MenuCommand.CommandID" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ComponentModel.Design.CommandID</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> associated with this menu command.</summary>
<value>The <see cref="T:System.ComponentModel.Design.CommandID" /> associated with the menu command.</value>
<remarks>To be added.</remarks>
<altmember cref="T:System.ComponentModel.Design.CommandID" />
</Docs>
</Member>
<Member MemberName="Enabled">
<MemberSignature Language="C#" Value="public virtual bool Enabled { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Enabled" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.MenuCommand.Enabled" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Enabled As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool Enabled { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Enabled : bool with get, set" Usage="System.ComponentModel.Design.MenuCommand.Enabled" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether this menu item is available.</summary>
<value>
<see langword="true" /> if the item is enabled; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example creates a <xref:System.ComponentModel.Design.MenuCommand> object, configures its properties, and adds it to <xref:System.ComponentModel.Design.IMenuCommandService>.
[!code-cpp[MenuCommand Example#1](~/samples/snippets/cpp/VS_Snippets_Winforms/MenuCommand Example/CPP/component1.cpp#1)]
[!code-csharp[MenuCommand Example#1](~/samples/snippets/csharp/VS_Snippets_Winforms/MenuCommand Example/CS/component1.cs#1)]
[!code-vb[MenuCommand Example#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/MenuCommand Example/VB/component1.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Invoke">
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Invokes the command.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Invoke">
<MemberSignature Language="C#" Value="public virtual void Invoke ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Invoke() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.Design.MenuCommand.Invoke" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Invoke ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Invoke();" />
<MemberSignature Language="F#" Value="abstract member Invoke : unit -&gt; unit&#xA;override this.Invoke : unit -&gt; unit" Usage="menuCommand.Invoke " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Invokes the command.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Invoke">
<MemberSignature Language="C#" Value="public virtual void Invoke (object arg);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Invoke(object arg) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.Design.MenuCommand.Invoke(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Invoke (arg As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Invoke(System::Object ^ arg);" />
<MemberSignature Language="F#" Value="abstract member Invoke : obj -&gt; unit&#xA;override this.Invoke : obj -&gt; unit" Usage="menuCommand.Invoke arg" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="arg" Type="System.Object" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="arg">An optional argument for use by the command.</param>
<summary>Invokes the command with the given parameter.</summary>
<remarks>To be added.</remarks>
<block subset="none" type="overrides">
<para>The default implementation of this method ignores <paramref name="arg" />, but deriving classes may override this method and use it.</para>
</block>
</Docs>
</Member>
<Member MemberName="OleStatus">
<MemberSignature Language="C#" Value="public virtual int OleStatus { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 OleStatus" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.MenuCommand.OleStatus" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property OleStatus As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property int OleStatus { int get(); };" />
<MemberSignature Language="F#" Value="member this.OleStatus : int" Usage="System.ComponentModel.Design.MenuCommand.OleStatus" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the OLE command status code for this menu item.</summary>
<value>An integer containing a mixture of status flags that reflect the state of this menu item.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OnCommandChanged">
<MemberSignature Language="C#" Value="protected virtual void OnCommandChanged (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnCommandChanged(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.Design.MenuCommand.OnCommandChanged(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnCommandChanged (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnCommandChanged(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnCommandChanged : EventArgs -&gt; unit&#xA;override this.OnCommandChanged : EventArgs -&gt; unit" Usage="menuCommand.OnCommandChanged e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.ComponentModel.Design.MenuCommand.CommandChanged" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.ComponentModel.Design.MenuCommand.OnCommandChanged%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.ComponentModel.Design.MenuCommand.OnCommandChanged(System.EventArgs)" /> in a derived class, be sure to call the base class' <see cref="M:System.ComponentModel.Design.MenuCommand.OnCommandChanged(System.EventArgs)" /> method so that registered delegates receive the event.</para>
</block>
</Docs>
</Member>
<Member MemberName="Properties">
<MemberSignature Language="C#" Value="public virtual System.Collections.IDictionary Properties { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.IDictionary Properties" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.MenuCommand.Properties" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property Properties As IDictionary" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Collections::IDictionary ^ Properties { System::Collections::IDictionary ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Properties : System.Collections.IDictionary" Usage="System.ComponentModel.Design.MenuCommand.Properties" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IDictionary</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the public properties associated with the <see cref="T:System.ComponentModel.Design.MenuCommand" />.</summary>
<value>An <see cref="T:System.Collections.IDictionary" /> containing the public properties of the <see cref="T:System.ComponentModel.Design.MenuCommand" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
All menu commands store their public properties in the <xref:System.ComponentModel.Design.MenuCommand.Properties%2A> collection. The key in the properties dictionary is the property name. This allows for generic enumeration of properties and provides a consistent substrate from which new properties can be added without modifying the class definition.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Supported">
<MemberSignature Language="C#" Value="public virtual bool Supported { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Supported" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.MenuCommand.Supported" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Supported As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool Supported { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Supported : bool with get, set" Usage="System.ComponentModel.Design.MenuCommand.Supported" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether this menu item is supported.</summary>
<value>
<see langword="true" /> if the item is supported, which is the default; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example creates a <xref:System.ComponentModel.Design.MenuCommand> object, configures its properties, and adds it to the <xref:System.ComponentModel.Design.IMenuCommandService>.
[!code-cpp[MenuCommand Example#1](~/samples/snippets/cpp/VS_Snippets_Winforms/MenuCommand Example/CPP/component1.cpp#1)]
[!code-csharp[MenuCommand Example#1](~/samples/snippets/csharp/VS_Snippets_Winforms/MenuCommand Example/CS/component1.cs#1)]
[!code-vb[MenuCommand Example#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/MenuCommand Example/VB/component1.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.Design.MenuCommand.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::String ^ ToString();" />
<MemberSignature Language="F#" Value="override this.ToString : unit -&gt; string" Usage="menuCommand.ToString " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a string representation of this menu command.</summary>
<returns>A string containing the value of the <see cref="P:System.ComponentModel.Design.MenuCommand.CommandID" /> property appended with the names of any flags that are set, separated by pipe bars (|). These flag properties include <see cref="P:System.ComponentModel.Design.MenuCommand.Checked" />, <see cref="P:System.ComponentModel.Design.MenuCommand.Enabled" />, <see cref="P:System.ComponentModel.Design.MenuCommand.Supported" />, and <see cref="P:System.ComponentModel.Design.MenuCommand.Visible" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Visible">
<MemberSignature Language="C#" Value="public virtual bool Visible { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Visible" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.MenuCommand.Visible" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Visible As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool Visible { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.Visible : bool with get, set" Usage="System.ComponentModel.Design.MenuCommand.Visible" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether this menu item is visible.</summary>
<value>
<see langword="true" /> if the item is visible; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example creates a <xref:System.ComponentModel.Design.MenuCommand> object, configures its properties, and adds it to the <xref:System.ComponentModel.Design.IMenuCommandService>.
[!code-cpp[MenuCommand Example#1](~/samples/snippets/cpp/VS_Snippets_Winforms/MenuCommand Example/CPP/component1.cpp#1)]
[!code-csharp[MenuCommand Example#1](~/samples/snippets/csharp/VS_Snippets_Winforms/MenuCommand Example/CS/component1.cs#1)]
[!code-vb[MenuCommand Example#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/MenuCommand Example/VB/component1.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.