In Xamarin.Forms you have Behaviors that perform certain actions on certain events. For example checking if input is valid on a text change event.
This morning I started
Triggers are objects that contain one or more actions and invoke those actions in response to some stimulus. One very common trigger is one that fires in response to an event (an EventTrigger). Other examples might include a trigger that fires on a timer, or a trigger that fires when an unhandled exception is thrown.
A behavior does not have the concept of invocation; instead, it acts more as an add-on to an object: optional functionality that can be attached to an object if desired. It may do certain things in response to stimulus from the environment, but there is no guarantee that the user can control what this stimulus is: it is up to the behavior author to determine what can and cannot be customized.
For More Info,
See This
or
See This
Triggers allow us to conditionally make actions within XAML, whereas Behaviors allow to modify and increment the default behavior of any control.
Triggers : A Trigger is an action fired after a certain situation. This situation is defined in XAML with the Trigger declaration. Each trigger could be composed of one or more TriggerActions
Behaviors : Behaviors are meant to extend the View you apply them to far beyond the normal use.
Continue reading...
Related articles :