" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

Set Scroll To A Particular Item In WinJS ListView

Posted on January 27th, 2016 by Anup Samantray

The code snippet below sets the scroll to the last item of the list   //Array of numbers var array = [2, 3, 4, 5, 6, 7, 8, 9, 10]; //Bind the array to list var list = new WinJS.Binding.List(array); var listView = document.getElementById(“basicListview”).winControl; //Set the itemDataSource property of basicListview listView.itemDataSource = list.dataSource; //The function […]

How to catch the click event of the button inside the WinJs ListView

Posted on November 23rd, 2015 by Debashrita Swain

Goal: Catch the click events of the button inside the WinJs listview using win-interactive class  and   WinJS.Utilities.markSupportedForProcessing. sometimes we may have requirement like having buttons or diffrent images in the Winjs Listview items.As we click on the listview item ,ItemInvoke  event is always getting called.so to call the individual button click event we need win-interactive […]

How to bind data to the WinJs Listview using Template

Posted on November 23rd, 2015 by DEBASHRITA SWAIN

Goal: Binding  data to the  Winjs Listview using Template. ListView: Winjs Listview need an item template that contains the markup you want to use to display each list item. There are two ways to create a template we can use markup to define a WinJs.Binding.Template or we can create a templating function. WinJS.Binding.Template is easy […]

How to display items of different sizes in WinJs Listview

Posted on November 23rd, 2015 by Debashrita Swain

Goal: In many situations we need to display the items of different sizes in WinJs listView, but by default, the ListView allocates the same size cell for each  item  it contains. The size of the cell is determined by the size of the first item in the ListView. When the ListView contains items of different […]

Set The Scroll To a Particular Item in WinJS ListView

Posted on November 23rd, 2015 by Anup Samantaray

The code snippet below set the scroll to the last item of the list //Array of numbers var array = [2, 3, 4, 5, 6, 7, 8, 9, 10]; //Bind the array to list var list = new WinJS.Binding.List(array); var listView = document.getElementById(“basicListview”).winControl; //Set the itemDataSource property of basicListview listView.itemDataSource = list.dataSource; //The function accepts […]