CallMethodAction

You can use the CallMethodAction action to call a method that is defined for a specified object. The method being called must be a public method that takes no arguments and does not return a value or a public method whose signature matches that of an event handler.

To add a CallMethodAction

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

    Note

    The object to which the behavior is added provides the data context for the behavior.

    Tip

    You can also drag the method from the Data panel, which exposes the available methods.

  2. In the Common Properties category, in the TargetObject drop-down list, select the element that exposes the methods that are available to call. You can use the ****Artboard Element Picker ****Artboard Element Picker icon to select the element, or you can use Browse to pick the element from a list of elements, data sources, or data contexts that appear in the project.

    CallMethodAction

  3. After you have selected your target, specify the method that you want to call in the MethodName box.

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

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