[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets or sets the command associated with the menu item.
Assembly: PresentationFramework (in PresentationFramework.dll)
This property is used to associate a command with a particular MenuItem instance. The following example associates the Copy command with a MenuItem and automatically supplies the input gesture text Ctrl+C. The example does not set the Header property, but the Header for the MenuItem is "Copy" at run time. You can specify another header for the MenuItem if you want it to be different. For information on how to bind to the desired command, see How to: Add a Command to a MenuItem.
The following examples show how to use the command property to associate commands with menu items.
Windows 8 Consumer Preview, Windows Server 8 Beta, Windows 7, Windows Server 2008 SP2, Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.