Click here to Skip to main content
13,053,399 members (59,338 online)
Rate this:
Please Sign up or sign in to vote.
See more:
what are the diferences among Behaviours ,triggers, Action.

i have read many articalls about this but iam unable to understand what are basic differences among them . when should i go for those in silver light

Please help me any one
Posted 21-Jun-12 17:32pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


Think of the following sentence:

When I press the button, the door opens.

This sentence includes
an action, the opening off the door, and
a trigger that causes the action to happen, pressing the button.

And that really is all an Action is:
An activity in the most general sense. We will have built-in Actions that do common things such as playing storyboards, setting properties, setting state and many more, but really, an Action can do anything someone decides to write. Your imagination is the limit.

Just like Actions, Blend 3 will supply built-in Triggers, for example for common events.
And again, Triggers are extensible so the community can create new ones.
Here are a few examples for possible Triggers:
TimerTrigger fires when a timer expires.

You could have triggers that fire when a data base element changes. Or when the network connection on your machine goes down.
Again, only your imagination is the limit.


There are many bits of interactivity that cannot easily be encapsulated with Triggers and Actions.

For example, if you want to make something drag-able on a canvas, you need to deal with at least three events:
You need to
-begin a drag when the mouse is pressed,
-update when the mouse is moved during a drag, and
-terminate the drag when the mouse is released.

Also, you need to preserve state. And this is exactly what behaviors allow you to do.
Behaviors let you encapsulate multiple related or dependent activities plus state in a single reusable unit.
Ref.: electric beach's blog[^]

For more have a look on following threads:
Difference between Behaviors and Action triggers in WPF MVVM[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 22 Jun 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100