PortablePrism.Portable by Andrii Chebukin

<PackageReference Include="PortablePrism.Portable" Version="1.0.1" />


public class CompositeCommand : ICommand
The CompositeCommand composes one or more ICommands.

Gets the list of all the registered commands.

Occurs when any of the registered commands raise CanExecuteChanged. You must keep a hard reference to the handler to avoid garbage collection and unexpected results. See remarks for more information.

Initializes a new instance of CompositeCommand.

public CompositeCommand(bool monitorCommandActivity)

Initializes a new instance of CompositeCommand.

public virtual bool CanExecute(object parameter)

Forwards CanExecute to the registered commands and returns true if all of the commands return true.

public virtual void Execute(object parameter)

Forwards Execute to the registered commands.

protected virtual void OnCanExecuteChanged()

Raises CanExecuteChanged on the UI thread so every command invoker can requery CanExecute to check if the CompositeCommand can execute.

public virtual void RegisterCommand(ICommand command)

Adds a command to the collection and signs up for the CanExecuteChanged event of it.

protected virtual bool ShouldExecute(ICommand command)

Evaluates if a command should execute.

public virtual void UnregisterCommand(ICommand command)

Removes a command from the collection and removes itself from the CanExecuteChanged event of it.