Behaviors let you add functionality to user interface controls without having to subclass them. Behaviors are written in code and added to controls in XAML or code. Behaviors are the best way to validate the user inputs such as email, phone number, etc.