Share via


EventTrigger (Windows Phone)

You can use the EventTrigger trigger in a Windows Phone project to invoke an action based on an event such as a mouse click, a page loading, or another interaction. EventTrigger is the default trigger for actions that you define in Blend for Visual Studio 2012.

To add an EventTrigger 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 SourceName box, select the element that will enable the event. By default, the SourceName is the element that contains an action. You can use the Artboard Element Picker  to select the object directly on the artboard.

  3. In the SourceObject box, select the source object for this EventTriggerBase. You can use the Artboard Element Picker  to select the element directly on the artboard. You can also click Data bind  to bind the data.

  4. In the EventName drop-down list, select the event that you want to trigger the action.