O'Reilly logo

Windows® Phone 7 Application Development 24-Hour Trainer by Brian Faucher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Working with UI Controls

In this lesson you will learn about the Silverlight control model, how custom reusable controls can be built, how to bind data to controls, and how to implement control-to-control binding. At the end of the lesson you will put all this together to create a unique-looking video player application.

UNDERSTANDING THE CONTROL MODEL

Windows Phone 7 supports a subset of the controls found in Silverlight. The controls available in Silverlight for Windows Phone 7 are as follows:

  • Border

  • Button

  • Canvas

  • CheckBox

  • ContentControl

  • ContentPresenter

  • Control

  • Grid

  • HyperlinkButton

  • Image

  • InkPresenter

  • ListBox

  • MediaElement

  • MultiScaleImage

  • Panel

  • PasswordBox

  • ProgressBar

  • RadioButton

  • ScrollViewer

  • Slider

  • StackPanel

  • TextBlock

  • TextBox

  • UserControl

Unsupported controls in Silverlight for Windows Phone 7 are as follows:

  • Calendar

  • ComboBox

  • DataGrid

  • DatePicker

  • Frame

  • GridSplitter

  • Label

  • OpenFileDialog

  • Page

  • SaveFileDialog

  • ScrollBar

  • TabControl

  • ToolTip

Additional controls available in the Silverlight for Windows Phone Toolkit:

  • GestureService/GestureListener

  • ContextMenu

  • DatePicker

  • TimePicker

  • ToggleSwitch

  • WrapPanel

The Silverlight for Windows Phone Toolkit can be downloaded at http://silverlight.codeplex.com/releases/view/52297.

One of Microsoft's goals when it was designing the Silverlight architecture was to provide developers and designers with a means of easily creating reusable controls. You are presented with a base class of controls from which you can inherit when building a customer UI control template.

As an example of reusing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required