HTML and CSS Reference
In-Depth Information
var flipView = document.getElementById("gallery").winControl;
flipView.itemDataSource =;
At this point, the FlipView component is bound to the array of photos. If you run the application
now, it works and the FlipView performs its tasks really well. Unfortunately, the resulting application is
neither attractive nor useful for the user. The FlipView scrolls through the bound list of Photo objects
but it can only render them as plain text. Figure 7-6 shows what you get at this point.
There's one more piece of code that needs be explained. You open the home.js file and add a call
to GalleryApp.init in the ready event handler so that the FlipView can be initialized when the home
page is loaded.
(function () {
"use strict";
WinJS.UI.Pages.define("/pages/home/home.html", {
ready: function (element, options) {
unload: function () {
The unload event handler is empty now, but you'll be using it in a moment.
FIGURE 7-6 The FlipView just showing some bound data.
Search WWH ::

Custom Search