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

SetContext

M v1.0

This command allows you to set an entity context value based on a user's action. For example, you could build a custom Campus Context Picker and set the context when the user taps an action button.

The parameter should be an instance of the SetContextParameters class, which is described below.

Properties

PropertyTypeDescription
NamestringThe name of the entity whose context is to be set. For example Campus.  
ValueGuid?The Guid value to set the context name to. If this is left blank then the context is unset. Defaults to null.
<Button Text="Tap"
    Command="{Binding SetContext}">
    <Button.CommandParameter>
        <Rock:SetContextParameters Name="Campus"
            Value="e4d80e57-da60-4822-bc22-c071f02958e8" />
    </Button.CommandParameter>
</Button>