DataMenuCommand 类

此类型具有 SecurityCriticalAttribute 特性,此特性将其限定为只能由 .NET Framework for Silverlight 类库在内部使用。使用此类型的任何成员的应用程序代码将引发 MethodAccessException。

[SECURITY CRITICAL]

表示扩展 MenuCommand 选件类支持状态更新。

继承层次结构

System.Object
  System.ComponentModel.Design.MenuCommand
    Microsoft.VisualStudio.Data.Framework.DataMenuCommand
      Microsoft.VisualStudio.Data.Framework.DataViewMenuCommand

命名空间:  Microsoft.VisualStudio.Data.Framework
程序集:  Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)

语法

声明
<SecurityCriticalAttribute> _
<HostProtectionAttribute(SecurityAction.LinkDemand, SharedState := True)> _
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Class DataMenuCommand _
    Inherits MenuCommand
[SecurityCriticalAttribute]
[HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true)]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class DataMenuCommand : MenuCommand
[SecurityCriticalAttribute]
[HostProtectionAttribute(SecurityAction::LinkDemand, SharedState = true)]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public ref class DataMenuCommand : public MenuCommand
[<SecurityCriticalAttribute>]
[<HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true)>]
[<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")>]
type DataMenuCommand =  
    class
        inherit MenuCommand
    end
public class DataMenuCommand extends MenuCommand

DataMenuCommand 类型公开以下成员。

构造函数

  名称 说明
公共方法 DataMenuCommand(CommandID) 初始化 DataMenuCommand 选件类的新实例,指定顺序标识符。
公共方法 DataMenuCommand(CommandID, EventHandler) 初始化 DataMenuCommand 选件类的新实例,并指定该命令ID和事件。
公共方法 DataMenuCommand(CommandID, EventHandler, EventHandler) 初始化 DataMenuCommand 选件类的新实例,指定命令ID和事件。

页首

属性

  名称 说明
公共属性 Checked 获取或设置一个值,用以指示是否选中此菜单项。 (继承自 MenuCommand。)
公共属性 CommandID 获取与此菜单命令相关联的 CommandID。 (继承自 MenuCommand。)
公共属性 Enabled 获取一个值,该值指示此菜单项是否可用。 (继承自 MenuCommand。)
公共属性 OleStatus 获取此菜单项的 OLE 命令状态代码。 (继承自 MenuCommand。)
公共属性 Properties 获取与 MenuCommand 关联的公共属性。 (继承自 MenuCommand。)
公共属性 Supported 获取或设置一个值,用以指示是否支持此菜单项。 (继承自 MenuCommand。)
公共属性 Text 检索菜单命令的 Text 属性。
公共属性 Visible 获取或设置一个值,用以指示此菜单项是否可见。 (继承自 MenuCommand。)

页首

方法

  名称 说明
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 Invoke() 调用菜单命令。 (重写 MenuCommand.Invoke()。)
公共方法 Invoke(Object) 调用具有给定参数的菜单命令。 (重写 MenuCommand.Invoke(Object)。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 OnCommandChanged 引发 CommandChanged 事件。 (继承自 MenuCommand。)
公共方法 ToString 返回此菜单命令的字符串表示形式。 (继承自 MenuCommand。)
公共方法 UpdateStatus 更新命令的状态并引发相应的事件。

页首

事件

  名称 说明
公共事件 CommandChanged 在菜单命令出现更改时发生。 (继承自 MenuCommand。)

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.VisualStudio.Data.Framework 命名空间

MenuCommand