Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8313513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:30:53+00:00 2026-06-08T20:30:53+00:00

I am trying to create a simple HTML Metro App for Windows 8. I

  • 0

I am trying to create a simple HTML Metro App for Windows 8. I want to display a list view, and based on the clicked item display different content on the screen. It sounds trivial, right?
But it doesn’t work! Here is my code:

<div  id="frameListViewTemplate"  data-win-control="WinJS.Binding.Template">
   <img data-win-bind="src: picture" class="thumbnail" />
</div>
<div id="basicListView" data-win-control="WinJS.UI.ListView" 
    data-win-options="{itemDataSource : DataExample.itemList.dataSource, itemTemplate: select('#frameListViewTemplate'),onselectionchanged : handler}">
</div>

Than in the defult.js

var myListView = document.getElementById("basicListView").winControl;
myListView.addEventListener("selectionchanged", handler);

And the handler:

function handler() {
console.log("Inside the handler  : ");
}
handler.supportedForProcessing = true;

So the handler is never called. My questions are: How can I add an event listener and its handler to the listview control.
How can I recognize which element on the list view was clicked.

P.S.
The listview is displayed properly in my app.
Thank you for help,
J

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:30:54+00:00Added an answer on June 8, 2026 at 8:30 pm

    To get the item that is “clicked”, you need to use itemInvoked. Selection changed would happen when the user cross slides on the item to select it, rather than taping/clicking to “invoke” it.

    http://msdn.microsoft.com/en-us/library/windows/apps/br211827.aspx has some basic details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I was trying to follow http://developer.android.com/guide/topics/media/camera.html to create a simple app that captures
I am trying to create a simple HTML table in which I want the
Im trying to create a simple pan and zoom app using silverlight 4, but
I am trying to create a simple iPhone application using HTML/JavaScript/CSS with the help
I am trying to create a simple app for the iPad that with play
I am trying to create a simple test HTML page which shows messages from
Im trying to create a simple dll file.Im following the tutorial http://java.sun.com/docs/books/jni/html/start.html when i
I am trying to create a simple web app using Python on GAE. The
I am trying to create a simple unordered list, and everything seems to be
I'm trying to create a simple report on an intranet site. Based on this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.