MESCIUS.ActiveReports.Design.Win Assembly / GrapeCity.ActiveReports.Design Namespace / Designer Class / ExecuteAction Method / ExecuteAction(DesignerAction) Method
The DesignerAction to be executed. This action corresponds to various design-time operations such as adding new controls, deleting controls, or changing properties.
Example

ExecuteAction(DesignerAction) Method
Executes the specified DesignerAction command within the designer environment.
Syntax
'Declaration
 
Public Overloads Sub ExecuteAction( _
   ByVal action As DesignerAction _
) 
 

Parameters

action
The DesignerAction to be executed. This action corresponds to various design-time operations such as adding new controls, deleting controls, or changing properties.
Remarks
This method facilitates the execution of design-time actions, typically triggered by user interaction with custom toolbars or menus in the designer interface. It allows for the extension of the designer's functionality by enabling the execution of predefined actions programmatically.
Example
// The following example demonstrates how to remove selected items from the designer surface by executing the EditDelete action:
private void RemoveSelectedItems()
{
	designer.ExecuteAction(DesignerAction.EditDelete);
}
// You can also clear the designer surface by selecting all items and deleting them
private void Clear()
{
	designer.ExecuteAction(DesignerAction.SelectAll);
	designer.ExecuteAction(DesignerAction.EditDelete);
}
See Also