Search Results for

    Show / Hide Table of Contents

    Class DesignerCommand

    The base class for all designer commands.

    Inheritance
    System.Object
    DesignerCommand
    AboutCommand
    AccountCommand
    AddDataCommand
    BringToFrontCommand
    ChooseDataCommand
    CloseCommand
    CopyPageCommand
    CutCommand
    DeleteCommand
    DeletePageCommand
    EditCommand
    FindCommand
    FormatPainterCommand
    GroupCommand
    HelpContentsCommand
    InsertBandCommand
    InsertCommand
    NewCommand
    NewDialogCommand
    NewPageCommand
    OpenCommand
    OpenPageCommand
    OpenViaCloudCommand
    OptionsCommand
    PageSettingsCommand
    PasteCommand
    PolygonSelectModeCommand
    PreviewCloudCommand
    PreviewCommand
    PrinterSettingsCommand
    RecentFilesCommand
    RedoCommand
    ReportSettingsCommand
    ReportStylesCommand
    ReportValidationCommand
    SaveAllCommand
    SaveAsCommand
    SaveCommand
    SaveToCloudCommand
    SaveWithRandomDataCommand
    SelectAllCommand
    SelectLanguageCommand
    SortDataSourcesCommand
    UndoCommand
    ViewStartPageCommand
    WelcomeCommand
    Namespace: FastReport.Design
    Assembly: FastReport.dll
    Syntax
    public class DesignerCommand

    Properties

    Enabled

    Gets a value indicating that the command is enabled.

    Declaration
    public bool Enabled { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    If you use own controls that invoke designer commands, use this property to refresh the Enabled state of a control that is bound to this command.

    Methods

    GetEnabled()

    Gets a value for the Enabled property.

    Declaration
    protected virtual bool GetEnabled()
    Returns
    Type Description
    System.Boolean

    true if command is enabled.

    Invoke()

    Invokes the command.

    Declaration
    public virtual void Invoke()

    Invoke(Object, EventArgs)

    Invokes the command with specified sender and event args.

    Declaration
    public void Invoke(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    Sender.

    System.EventArgs e

    Event args.

    Remarks

    This method is compatible with standard System.EventHandler and can be passed to the event handler constructor directly.

    Events

    CustomAction

    Defines a custom action for this command.

    Declaration
    public event EventHandler CustomAction
    Event Type
    Type Description
    System.EventHandler
    Remarks

    Using custom action, you can override the standard behavior of this designer's command.

    Examples

    This example demonstrates how to override the "New..." command behavior.

    // add an event handler that will be fired when the designer is run
    Config.DesignerSettings.DesignerLoaded += new EventHandler(DesignerSettings_DesignerLoaded);
    
    void DesignerSettings_DesignerLoaded(object sender, EventArgs e)
    {
      // override "New..." command behavior
      (sender as Designer).cmdNew.CustomAction += new EventHandler(cmdNew_CustomAction);
    }
    
    void cmdNew_CustomAction(object sender, EventArgs e)
    {
      // show the "Label" wizard instead of standard "Add New Item" dialog
      Designer designer = sender as Designer;
      LabelWizard wizard = new LabelWizard();
      wizard.Run(designer);
    }
    Back to top © 1998-2025 Copyright Fast Reports Inc.