From the course: Extending Xamarin with Behaviors, Commands, and Triggers
Unlock this course with a free trial
Join today to access over 22,400 courses taught by industry experts.
Implement the MultiTrigger - Xamarin Tutorial
From the course: Extending Xamarin with Behaviors, Commands, and Triggers
Implement the MultiTrigger
- [Instructor] Okay, now that our stage has been set, let's begin by creating a multi-trigger. Let's get rid of our ending line here, and create a new closing tag. And let's add a new tag for Button.Triggers. Another closing tag, and now we're going to start with creating our multi-trigger. It's going to accept the TargetType, and it's going to be the button. Let's create our closing tag now. Multi-triggers have the if/and L statements. For that, we're going to have to declare binding conditions inside of a new tag called MultiTrigger.Conditions. We're going to create our first binding condition to make sure that the entry name string is neither no or empty. Let's create our binding condition. And we're going to set a binding value. We're going to set our source to reference our entry name field. We're going to set to path for text as the variable we're going to use. And we're going to set our converter to the static resource that checks for empty strings. I won't go too much into how…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.