What is Behaviors and give some examples where we should use Behaviors?

Technology CommunityCategory: XamarinWhat is Behaviors and give some examples where we should use Behaviors?
VietMX Staff asked 3 years ago

Behaviors help us in adding functionality to user interface controls without creating a subclass of it. Required functionality is implemented using the Behavior class and attached to that control as if it is part of this control.

Examples where we can use Behaviors are:

  • An Email Validater in an Entry
  • Creating a rating control using a Tap Gesture
  • Controlling Animation
  • Adding some effect to a control