Tutorial on Silverlight 4 databinding in code-behind, custom user controls, etc.
10/19/2010
3 comments
Introduction
This small tutorial was written to show the students the following aspects of Silverlight:
- Writing a class that can be used for databinding
- Perform data-binding through code instead of XAML
- Creating a custom user control
- Writing simple data converters
Suppose we are creating a Silverlight game in which each player is represented as a pawn. However, the player class itself is somewhere deep inside the game-engine and we would like the pawn user control to be only loosely coupled to this player class. By doing this, we are able to make a rapid Silverlight prototype and if we later decide that the frontend is pretty lame, we can simply redesign it without too much fuss.
