ClassCompositeCommand
Represents a composite command.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public class CompositeCommand : UndoableDelegateCommand, ICommand
Inheritance: objectUndoableDelegateCommandCompositeCommand
Derived Classes:
Implements:
Inherited Members
Constructors
CompositeCommand(string, Action<object>, Action<object>, Predicate<object>)
Initializes a new instance of the CompositeCommand class.
Declaration
public CompositeCommand(string name, Action<object> execute = null, Action<object> undo = null, Predicate<object> canExecute = null)
Parameters
name
The name or title of the composite action.
execute
The execute action.
undo
The undo action.
canExecute
The CanExecute action.
Properties
Commands
Gets the commands.
Declaration
public IEnumerable<ICommand> Commands { get; }
Property Value
Methods
AddCommand(ICommand)
Adds a command to the composite command.
Declaration
public CompositeCommand AddCommand(ICommand command)
Parameters
command
Returns
CanExecute(object)
Returns boolean value indicating whether this command can be executed.
Clear()
Clears the commands from the composite command.
Execute(object)
Executes the specified state.
Declaration
public override void Execute(object state = null)
Parameters
state
Overrides
InsertCommand(int, ICommand)
Inserts a command into the composite command at specific index.
Declaration
public CompositeCommand InsertCommand(int position, ICommand command)
Parameters
position
command
Returns
Redo()
Executes and undoable action.
Declaration
public override void Redo()
Overrides
RemoveCommand(ICommand)
Removes a command from the composite command.
Declaration
public CompositeCommand RemoveCommand(ICommand command)
Parameters
command
The command.
Returns
Undo(object)
Unwinds an undoable action.
Declaration
public override void Undo(object state = null)
Parameters
state
Overrides