Displaying the data
We have learned about the different sources of data and seen a couple of examples on how to get the data. Now we will see how to format and display that data. In the previous examples, we saw how we can bind data to any HTML element, but fortunately there is a better way to do this. The better way is using the Windows library for JavaScript, which provides controls and templates that make it easy to format and display the data. The most famous controls are ListView
and FlipView
; when it comes to binding and displaying data, the same technique applies for both but we'll use ListView
in this chapter. It is not out of personal preference but a question of taking advantage of the features of ListView
control, since it provides a flexible way to display data with built-in support for the cross-slide (touch) gesture; also, it is performance-optimized. Moreover, it delivers an appearance and a behavior that are consistent with Windows Store apps. The steps to do the binding...