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

  • Home
  • SEARCH
  • 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 8852939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:31:32+00:00 2026-06-14T13:31:32+00:00

Not quite sure how to phrase this problem I have so I hope this

  • 0

Not quite sure how to phrase this problem I have so I hope this makes sense.

I want to create a listview, and have set up all the data bindings and created a template etc, so it displays the data nicely, but one of the elements on each listview tile I show is a live ticking clock. The question really is how do I update all of the listview objects without redrawing the whole listview.

The only working method I have at the moment is to update the data bound to it every second, with the time I would like to display, which works, but it redraws the whole listview. Which is expensive, and triggers an animation (which can be canceled, but not completely listening to the animation start event)

Thanks!

  • 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-14T13:31:34+00:00Added an answer on June 14, 2026 at 1:31 pm

    One way would be to use a JavaScript template for your listview. Bind the data to your list view as normal but add a property to the data model called clock. For the data item you want to render a clock set it’s value to true. Rather than defining the template in HTML define the template in JavaScript (you can see how to do this here – http://msdn.microsoft.com/en-us/library/windows/apps/jj585523.aspx) In the JavaScript template you can then add some logic to determine if the tile should be a clock based on the bound property and if it is create the clock template:

    function itemTemplateFunction(itemPromise) {
    
            return itemPromise.then(function (item) {
    
                if (item.data.clock == true) {
                    //TODO: Append HTML and JS for your clock object
                    //TODO: Perhaps set up a setInterval timer to tick your clock along.
    
                }
                else {
                    //TODO Add the regular template Code, example below
                    var div = document.createElement("div");
    
                    var img = document.createElement("img");
                    img.src = item.data.picture;
                    img.alt = item.data.title;
                    div.appendChild(img);
    
                    var childDiv = document.createElement("div");
    
                    var title = document.createElement("h4");
                    title.innerText = item.data.title;
                    childDiv.appendChild(title);
    
                    var desc = document.createElement("h6");
                    desc.innerText = item.data.text;
                    childDiv.appendChild(desc);
    
                    div.appendChild(childDiv);
    
                    return div;
    
                }
            })
        };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not quite sure how to phrase this, so bear with me. I have
Not quite sure how to phrase this, but will do my best. I have
Alright, first off I'm not quite sure how to phrase my problem. This could
new to python/programming, so not quite sure how to phrase this.... What I want
I'm not quite sure how to do this. Let's say I have 2 associative
Sorry if this has been answered somewhere; I'm not quite sure how to phrase
I'm not quite sure on the best way to phrase this particular query, so
Not quite sure why this is happening, but I want to be able to
I'm not quite sure where to start with all of this, but im assuming
Sorry for the vague title but I'm not quite sure how to phrase 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.