Please login to access all of the features of the Community Site.

AggregateCommand

M1.0

This is a special-use command. It allows you to chain multiple commands together. A common usage of this would be to combine the SetContext and ReplacePage commands to change an Entity context and then reload the current page.

You specify the child commands to execute by using an instance of the AggregateCommandParameters object.

Properties

PropertyTypeDescription
Commands  ICollection<CommandReference>  The collection of commands that will be executed. This is the default property so you don't need to explicitly specify it.
<Button Text="Tap"
    Command="{Binding AggregateCommand}">
    <Button.CommandParameter>
        <Rock:AggregateCommandParameters>
            <Rock:CommandReference Command="{Binding SetContext}">
                <Rock:CommandReference.CommandParameter>
                    <Rock:SetContextParameters Name="Campus"
                        Value="0a3a20eb-c4a8-44fe-9daf-d22b88fae377" />
                </Rock:CommandReference.CommandParameter>
            </Rock:CommandReference>
            <Rock:CommandReference Command="{Binding ReplacePage}"
                CommandParameter="b06173ed-aa2f-43d8-bd38-eb5becca1cbe" />
        </Rock:AggregateCommandParameters>
    </Button.CommandParameter>
</Button>