Creating dynamic bindings

In the previous recipe, you've learned how to use data binding in XAML. This is often useful because it allows you to show data easily to your user, for example, showing user information or a list of products. In this recipe, you'll learn how to do exactly the same in C# code, instead of XAML. This can be useful in situations where you want to bind a dependency property to the property of an object that you'll know only at runtime.

Getting ready

For this recipe, we can continue from the solution that was completed in the previous recipe. Alternatively, you can find the starter solution in the Chapter02/SilverlightBanking_Dynamic_Bindings_Starter folder in the code bundle that is available on the Packt website. Also, the ...

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

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