Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic template in listview (WinJS) in windows 8

I have a windows 8 application with a simple listview in a list layout. I have fetched my blog items (syndication), now what I want to achieve is add a dynamic item that will function as a "load more" button. To do this, I want to specify a different template just for this item. The sample I have found uses a function template, which really isn't very versatile since I have to load all template elements using JavaScript. Is there a way to dynamically specify a WinJS.Binding.Template based on an item property?

like image 823
Themos Piperakis Avatar asked Feb 20 '23 12:02

Themos Piperakis


1 Answers

An excellent article on the subject

http://stephenwalther.com/blog/archive/2012/05/23/metro-dynamically-switching-templates-with-a-winjs-listview.aspx

like image 150
Themos Piperakis Avatar answered Mar 07 '23 01:03

Themos Piperakis