Combining converters, data binding, and DataContext into a custom DataTemplate

A lot of things we've talked about in this chapter are great features on their own, but they really shine when you combine them and let them work together. This recipe will show you how to bring some of the most powerful, built-in features of the Silverlight SDK together or, to put it differently, how to program "The Silverlight Way". We're going to create an editable ComboBox of people using a custom DataTemplate, the DataContext, an ObservableCollection with two-way data binding, and Converters to make the UI fluid, interactive, and responsive.

Getting ready

We're starting off with a completely new, blank Silverlight solution for this recipe. So, to get started, make ...

Get Silverlight 4 Data and Services Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.