VisualStudioFeeds

All Visual Studio blogs in one place

AddThis Social Bookmark Button
I've been playing quite a bit over the last few days with the new Windows 8 Release Preview, as part of a special team project I'm working on with some of my fellow DEs. One of the areas I was working on is doing some simple databinding using a ListView control in a JavaScript Metro style app based on the Navigation App template. In this second installment of my Windows 8, What I've Learned series, I'll give you a tip that may help save you some pain and troubleshooting time when declaratively associating an ItemTemplate for
a ListView control inside a page fragment. I was able to very easily create an array with a couple of objects, each with a couple of properties, and then bind those to the ListView by passing the array to the constructor of the WinJS.Binding.List object, which gave me a List object with a dataSource property that I could assign to the ListView's itemDataSource property in the ready() function of home.js, like so:listView.winControl.itemDataSource = myList.dataSource; So far, so good…when I ran the project, the data showed up, in JavaScript object style, as expected. But since that's not a very interesting...(Read whole news on source site)

Search

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Home : Blog List : .net DEvHammer - MSDN Blogs : W8WIL #2: Declaratively Specifying an ItemTemplate in a Fragment