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.
Property triggers - Xamarin Tutorial
From the course: Extending Xamarin with Behaviors, Commands, and Triggers
Property triggers
- [Man] Okay. Lets go back into our workspace and create our first trigger. Lets start with a property trigger. What I want is for on our At To Do page. Whenever the name or date field's selected, I'd like for the background to change so we can see that it's in focus. Lets go ahead and start to do that. We're going to go on our At To Do page and I want to go straight to our entry. I'm going to get rid of the closing tag. Create another ending tag. And I'm going to create a new tag inside of it called Entry.Triggers. Now similar to the Entry.Behaviors tag, You can add any amount of triggers in this spot. Lets go ahead and add a property trigger. So I'm going to find Trigger. I'm going to declare the Target Type. And our Target Type is Entry, which is the current view we're using. I'm going to declare a property type that I'm listening to. We want to make sure we're listening to whenever the Entry Viewer is selected and being typed on so we're going to use Is Focused. And when that…
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.