-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide
By :

Creating a line of business (LOB) application usually deals with data, controls that show data, controls that manipulate data, and so on. So far in this chapter, we have dealt with templates and styling of controls. But, there is another aspect of styling and templating, and that is styling and templating of data. When displaying a collection of items in Silverlight, using controls like ListBox
or ComboBox
, the data is rendered using data template. A data template is used to define how raw data will be presented to a user. To demonstrate the idea of data template, think about a menu hung on the wall of a donut shop. While it is easy to just have prices and names, a better visualization of the menu would be, each donut having a small image next to it. Appetite does start with the eyes after all. This visual organization of data is what data template is all about. Data templates are most commonly used with a control based on ItemsControl
, and while it is...
Change the font size
Change margin width
Change background colour