CHAPTER 13 EXERCISE SOLUTIONS

Exercise 1 Solution

False. The PhoneApplicationFrame object doesn't support page transitions. When you want to make use of the page transitions feature of the toolkit, you need to ensure that your application is using the TransitionFrame object instead. You can find this object in the App.xaml.cs file, under the InitializePhoneApplication method.

Exercise 2 Solution

The answers are a and c. Flick and Drag are the only valid gestures listed.

Exercise 3 Solution

When you need to determine which item was selected from an AutoCompleteBox control, you need to listen for the SelectionChanged event. In that event handler, you can cast the passed-in object to whatever data type you might have used for the collection of search items.

Exercise 4 Solution

The Silverlight for Windows Phone Toolkit provides the following page transition effects:

  • TurnstileTransition
  • RollTransition
  • SlideTransition
  • RotateTransition
  • SwivelTransition

Exercise 5 Solution

The answer is c. When you need to find out what date was selected from the DatePicker control, you can listen for the ValueChanged event in your code-behind page. You can also listen for the same event when using the TimePicker control to determine the selected time value.

Get Beginning Windows® Phone 7 Application Development: Building Windows® Phone Applications Using Silverlight® and XNA® now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.