ToolStripItem.Command 属性

定义

注意

若要使用此预览 API,必须通过在项目文件中将 EnablePreviewFeatures 属性设置为 True,在项目中启用预览功能。 有关详细信息,请参阅 https://aka.ms/dotnet-preview-features

获取或设置调用 ICommand ToolStripItem 事件时将调用其 Execute(Object) 方法的 Click

C#
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public System.Windows.Input.ICommand? Command { get; set; }
C#
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
[System.Runtime.Versioning.RequiresPreviewFeatures]
public System.Windows.Input.ICommand Command { get; set; }

属性值

属性

适用于

产品 版本
Windows Desktop 7, 8, 9, 10