Expression Studio 4.0

You can use the DataTrigger trigger to invoke an action based on the value of a property. If the value specified in the trigger matches a provided value, the trigger invokes any action associated with it. Otherwise, nothing happens.

To add a DataTrigger to a Windows Phone project

  1. In the Assets panel, click Behaviors, and then drag the behavior that you want onto the object that you want to apply the behavior to. The Trigger category appears in the Properties panel.

  2. In the Trigger category, next to TriggerType (EventTrigger), click New. In the Select Object dialog box, click DataTrigger, and then click OK.

  3. In the Trigger category, set the following:

    • Binding   Specifies the property binding to monitor for change.

    • Comparison   Specifies the operator that will be used to evaluate the condition for the DataTrigger. The values are as follows:

      • Equal

      • NotEqual

      • LessThan

      • LessThanOrEqual

      • GreaterThan

      • GreaterThanOrEqual

    • Value   Specifies a value to be used in conjunction with the Comparison property. The value is compared to the binding expression specified by the Binding property. The value can be typed directly in the Value text box.

To see a sample of this behavior, visit the Expression Community Gallery Hh134801.xtlink_newWindow(en-us,Expression.40).png.

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.