Delen via


DataMenuCommand Class

This type has a SecurityCriticalAttribute attribute, which restricts it to internal use by the .NET Framework for Silverlight class library. Application code that uses any member of this type throws a MethodAccessException.

[SECURITY CRITICAL]

Represents an extended MenuCommand class to support status updates.

Inheritance Hierarchy

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

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'Declaration
<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

The DataMenuCommand type exposes the following members.

Constructors

  Name Description
Public method DataMenuCommand(CommandID) Initializes a new instance of the DataMenuCommand class, specifying the command identifier.
Public method DataMenuCommand(CommandID, EventHandler) Initializes a new instance of the DataMenuCommand class, specifying the command identifier and event.
Public method DataMenuCommand(CommandID, EventHandler, EventHandler) Initializes a new instance of the DataMenuCommand class, specifying the command identifier and events.

Top

Properties

  Name Description
Public property Checked Gets or sets a value indicating whether this menu item is checked. (Inherited from MenuCommand.)
Public property CommandID Gets the CommandID associated with this menu command. (Inherited from MenuCommand.)
Public property Enabled Gets a value indicating whether this menu item is available. (Inherited from MenuCommand.)
Public property OleStatus Gets the OLE command status code for this menu item. (Inherited from MenuCommand.)
Public property Properties Gets the public properties associated with the MenuCommand. (Inherited from MenuCommand.)
Public property Supported Gets or sets a value indicating whether this menu item is supported. (Inherited from MenuCommand.)
Public property Text Retrieves the Text property of the menu command.
Public property Visible Gets or sets a value indicating whether this menu item is visible. (Inherited from MenuCommand.)

Top

Methods

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Invoke() Invokes the menu command. (Overrides MenuCommand.Invoke().)
Public method Invoke(Object) Invokes the menu command with the given parameter. (Overrides MenuCommand.Invoke(Object).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnCommandChanged Raises the CommandChanged event. (Inherited from MenuCommand.)
Public method ToString Returns a string representation of this menu command. (Inherited from MenuCommand.)
Public method UpdateStatus Updates the status of the command and raises the appropriate event.

Top

Events

  Name Description
Public event CommandChanged Occurs when the menu command changes. (Inherited from MenuCommand.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Data.Framework Namespace

MenuCommand