Triggers and user interactivity

This page applies to WPF projects only

During an application's lifetime, objects in the user interface undergo changes to their state. State is often expressed in terms oriented toward the user. For example, a button’s mouse-over state, or a menu item’s pressed state. These two example states are implemented on objects by using the UIElement.IsMouseOver property and the MenuItem.IsPressed property, respectively. You can configure your application to respond to the change in a trigger, for example, to run an animation.

Note

Triggers are not supported in Microsoft Silverlight 1.0 or Silverlight 2 projects. All user interaction in a Silverlight 1.0 application is accomplished by using event handlers. For an example, see Create a button that controls a storyboard in a Silverlight application. User interaction in a Silverlight 2 application can be accomplished by using event handlers or states. For more information, see Change state in response to user interaction.

In This Section

Conceptual

How to

See also

Concepts

Test a storyboard

Event handling and user interactivity

Controlling when your storyboard runs

Create a button that controls a storyboard in a Silverlight application

Try it: Create a button by using bitmap effects

Try it: Create a rollover button

Try it: Create a rollover button