Partager via


Conditional behaviors

In Blend for Visual Studio 2012, you can use conditional behaviors to link an action to event when a comparison evaluates to True. You can quickly apply conditions to actions by creating and modifying conditions in the Properties panel.

Blend conditional behaviors

The following conditional behaviors are available in Blend:

  • CallMethodAction   Use the CallMethodAction action to call a method on the DataContext of an element when an event occurs.

    For more information about this action, see CallMethodAction.

  • ChangePropertyAction   Use the ChangePropertyAction action to easily either change or increment the property of an object.

    For more information about this action, see ChangePropertyAction.

  • ControlStoryboardAction   Use a ControlStoryboardAction action to specify the state of the storyboard, such as Play, Pause, or Stopped.

    For more information about this action, see ControlStoryboardAction.

  • GoToStateAction   Use the GoToStateAction action to easily activate a custom visual state.

    For more information about this action, see GoToStateAction.

  • HyperlinkAction   Use the HyperlinkAction action to easily browse to a website address when the action is triggered.

    For more information about this action, see HyperlinkAction.

  • InvokeCommandAction   Use the InvokeCommandAction action to invoke a command exposed by the data source.

    For more information about this action, see InvokeCommandAction.

  • LaunchUriOrFileAction   Use the LaunchUriOrFileAction action to browse to a website or start an application when the action is triggered.

    For more information about this action, see LaunchUriOrFileAction.

  • PlaySoundAction   Use the PlaySoundAction action to play a sound when an action is triggered.

    For more information about this action, see PlaySoundAction.

  • RemoveElementAction   Use the RemoveElementAction action to easily remove an element from a logical tree.

    For more information about this action, see RemoveElementAction.

  • SetDataStoreValueAction   Use the SetDataStoreValueAction action to automatically adjust the values of your data store at run time.

    For more information about this action, see SetDataStoreValueAction.

SketchFlow conditional behaviors

The following conditional behaviors are available in SketchFlow:

  • NavigateBackAction   Use the NavigateBackAction action to navigate back to a screen you were previously viewing. The NavigateBackAction action functions in the same way as the Back button in the SketchFlow Player.

    For more information about this action, see NavigateBackAction.

  • NavigateForwardAction   Use the NavigateForwardAction action to navigate forward to a screen you were viewing before navigating back to a previous screen. The NavigateForwardAction action functions in the same way as the Forward button in the SketchFlow Player.

    For more information about this action, see NavigateForwardAction.

  • NavigateToScreenAction   Use the NavigateToScreenAction action to specify navigation between screens.

    For more information about this action, see NavigateToScreenAction.

  • NavigationMenuAction   Use the NavigationMenuAction action to associate a particular state with a particular screen. This is particularly useful if you are trying to mimic user navigation while preserving the navigation path and visual states that represent the user's interaction with a navigation menu.

    For more information about this action, see NavigationMenuAction.

  • PlaySketchFlowAnimationAction   Use the PlaySketchFlowAnimationAction action if you want to play a SketchFlow animation in response to a user's interaction with your prototype.

    For more information about this action, see PlaySketchFlowAnimationAction.

  • RemoveItemInListBoxAction   Use the RemoveItemInListBoxAction action to demonstrate removing an item from a list box.

    The RemoveItemInListBoxAction action works only inside a data template, and only to remove the list-box item that it is associated with from the from the data-bound list box in which it resides.

    For more information about this action, see RemoveItemInListboxAction.

[!REMARQUE]

You can use all of the behaviors in available in Blend in SketchFlow projects. However, SketchFlow behaviors are available only in SketchFlow projects.

Voir aussi

Concepts

Working with built-in behaviors

Working with built-in SketchFlow behaviors