What is the difference between Behaviors and Event Triggers?

前端 未结 2 753
心在旅途
心在旅途 2021-02-15 15:07

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

2条回答
  •  清歌不尽
    2021-02-15 15:25

    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 :

    1. http://www.bravent.net/xamarin-forms-13/
    2. http://www.damirscorner.com/blog/posts/20130624/
    3. http://blogs.msdn.com//an-introduction-to-behaviors-triggers-and-actions.aspx
    4. https://blog.xamarin.com/behaviors-in-xamarin-forms/
    5. https://blog.xamarin.com/triggers-in-xamarin-forms/

提交回复
热议问题