Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Windows Phone 7 Silverlight Cookbook

You're reading from   Windows Phone 7 Silverlight Cookbook All the recipes you need to start creating apps and making money.

Arrow left icon
Product type Paperback
Published in Aug 2011
Publisher Packt
ISBN-13 9781849691161
Length 304 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Jonathan Marbutt Jonathan Marbutt
Author Profile Icon Jonathan Marbutt
Jonathan Marbutt
Robb Schiefer Robb Schiefer
Author Profile Icon Robb Schiefer
Robb Schiefer
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

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. 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. 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image