StandardCommands Class

 

Defines identifiers for the standard set of commands that are available to most applications.

Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)


[HostProtectionAttribute(SecurityAction::LinkDemand, SharedState = true)]
[PermissionSetAttribute(SecurityAction::LinkDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = "FullTrust")]
public ref class StandardCommands 

NameDescription
System_CAPS_pubmethodStandardCommands()

Initializes a new instance of the StandardCommands class.

NameDescription
System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticAlignBottom

Gets the CommandID for the AlignBottom command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignHorizontalCenters

Gets the CommandID for the AlignHorizontalCenters command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignLeft

Gets the CommandID for the AlignLeft command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignRight

Gets the CommandID for the AlignRight command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignToGrid

Gets the CommandID for the AlignToGrid command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignTop

Gets the CommandID for the AlignTop command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticAlignVerticalCenters

Gets the CommandID for the AlignVerticalCenters command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticArrangeBottom

Gets the CommandID for the ArrangeBottom command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticArrangeIcons

Gets the CommandID for the ArrangeIcons command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticArrangeRight

Gets the CommandID for the ArrangeRight command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticBringForward

Gets the CommandID for the BringForward command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticBringToFront

Gets the CommandID for the BringToFront command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticCenterHorizontally

Gets the CommandID for the CenterHorizontally command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticCenterVertically

Gets the CommandID for the CenterVertically command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticCopy

Gets the CommandID for the Copy command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticCut

Gets the CommandID for the Cut command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticDelete

Gets the CommandID for the Delete command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticDocumentOutline

Gets the CommandID for the Document Outline command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticF1Help

Gets the CommandID for the F1Help command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticGroup

Gets the CommandID for the Group command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticHorizSpaceConcatenate

Gets the CommandID for the HorizSpaceConcatenate command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticHorizSpaceDecrease

Gets the CommandID for the HorizSpaceDecrease command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticHorizSpaceIncrease

Gets the CommandID for the HorizSpaceIncrease command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticHorizSpaceMakeEqual

Gets the CommandID for the HorizSpaceMakeEqual command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticLineupIcons

Gets the CommandID for the LineupIcons command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticLockControls

Gets the CommandID for the LockControls command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticMultiLevelRedo

Gets the CommandID for the MultiLevelRedo command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticMultiLevelUndo

Gets the CommandID for the MultiLevelUndo command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticPaste

Gets the CommandID for the Paste command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticProperties

Gets the CommandID for the Properties command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticPropertiesWindow

Gets the CommandID for the PropertiesWindow command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticRedo

Gets the CommandID for the Redo command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticReplace

Gets the CommandID for the Replace command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSelectAll

Gets the CommandID for the SelectAll command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSendBackward

Gets the CommandID for the SendBackward command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSendToBack

Gets the CommandID for the SendToBack command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticShowGrid

Gets the CommandID for the ShowGrid command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticShowLargeIcons

Gets the CommandID for the ShowLargeIcons command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToControl

Gets the CommandID for the SizeToControl command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToControlHeight

Gets the CommandID for the SizeToControlHeight command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToControlWidth

Gets the CommandID for the SizeToControlWidth command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToFit

Gets the CommandID for the SizeToFit command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSizeToGrid

Gets the CommandID for the SizeToGrid command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticSnapToGrid

Gets the CommandID for the SnapToGrid command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticTabOrder

Gets the CommandID for the TabOrder command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticUndo

Gets the CommandID for the Undo command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticUngroup

Gets the CommandID for the Ungroup command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVerbFirst

Gets the first of a set of verbs. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVerbLast

Gets the last of a set of verbs. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVertSpaceConcatenate

Gets the CommandID for the VertSpaceConcatenate command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVertSpaceDecrease

Gets the CommandID for the VertSpaceDecrease command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVertSpaceIncrease

Gets the CommandID for the VertSpaceIncrease command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticVertSpaceMakeEqual

Gets the CommandID for the VertSpaceMakeEqual command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticViewCode

Gets the CommandID for the ViewCode command. This field is read-only.

System_CAPS_pubfieldSystem_CAPS_staticViewGrid

Gets the CommandID for the ViewGrid command. This field is read-only.

This class defines CommandID identifiers for standard commands that are available to designers.

To add a command from the StandardCommands class to a designer menu, you must call the AddCommand method of an IMenuCommandService and add a MenuCommand that contains a CommandID from StandardCommands.

The following code example illustrates how to add a member of the StandardCommands class to a MenuCommand and how to add the MenuCommand to an IMenuCommandService.

   public ref class CDesigner: public ComponentDesigner
   {
   public:
    [PermissionSetAttribute(SecurityAction::Demand, Name="FullTrust")]
      virtual void Initialize( IComponent^ comp ) override
      {
         ComponentDesigner::Initialize( comp );
         IMenuCommandService^ mcs = static_cast<IMenuCommandService^>(comp->Site->GetService( IMenuCommandService::typeid ));
		 MenuCommand^ mc = gcnew MenuCommand( gcnew EventHandler( this, &CDesigner::OnF1Help ),StandardCommands::F1Help );
         mc->Enabled = true;
         mc->Visible = true;
         mc->Supported = true;
         mcs->AddCommand( mc );
         System::Windows::Forms::MessageBox::Show( "Initialize() has been invoked." );
      }

   private:
      void OnF1Help( Object^ /*sender*/, EventArgs^ /*e*/ )
      {
         System::Windows::Forms::MessageBox::Show( "F1Help has been invoked." );
      }
   };
}

NamedPermissionSet

for full access to system resources. Demand values: LinkDemand, InheritanceDemand. Associated state:

.NET Framework
Available since 1.1

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

Return to top
Show: