Understanding basic behaviors
As we have seen with the events handler example, you can assign event handling logic through XAML to associate the event handler as well as the ability to do it in your code behind. In this example, we will cover a very similar type of thing but with only XAML and in Blend. We will repeat the exact same example but with behaviors.
Getting ready
We will need to create a Windows Phone application, but this time in Expression Blend for easier drag-and-drop capabilities. So let's create the project in Blend using the following screenshot as a reference:
How to do it...
Now that we have our basic application that we can use for a test bed to use some built in behaviors by using tools built into Blend.
1. Let's drag-and-drop both a button and a textblock onto the design surface. We will have something that looks like this:
2. Instead of adding an event handler to change the text block, we are going to use a simple behavior that is called
ChangePropertyAction,
and you can...