locked
Flip view Changing title on page slow

    Question

  • Hi all,

    I am using a flip view . The page has a title which changes when user flips a page in the flip view.

    below is my code :

    var flipViewTemplate = element.querySelector(".itemslist");
    
                var flipView = element.querySelector(".itemslist").winControl;
                flipView.itemTemplate = element.querySelector(".itemtemplate");
                flipView.onpageselected = this.pageChanged.bind(this);

    The function implements this :

    pageChanged: function (args) {
                document.body.querySelector(".pagetitle").innerHTML = "Some thing" + (counter++);
            }

    The issue is that the page flips and then the title updates. So there is a lag between the page flipping and the updating the title.

    I saw the calendar app and I guess it also uses the flip view. But the title updates almost immediately. I want my title to respond like that (as soon as next/previous page loads, the title also should be updated.

    One more question : I see in the calendar app, the arrow (to move next/previous) is towards the top and not centered. How do we achieve this?

    Any suggestion is appreciated.

    - Girija


    Thursday, January 10, 2013 1:48 AM

All replies

  • Hi Girija,

    I have reproduced your scenario on my side. And got the same result with you. But the lag is very small. So I think that should be receptive.

    Again, the calendar app is not created by FlipView.


    Roy
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 10, 2013 9:09 AM
  • Hi Roy,

    Thanks for the answer. On Surface RT, the lag is very much and not acceptable.

    If Calendar app is not created by the flip view what is it created with ?

    - Girija

    Thursday, January 10, 2013 7:46 PM
  • Hi,

    I will involve more experts to investigate it.


    Roy
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 11, 2013 5:22 AM
  • Hello Girija,

    Things run slow when you run it under the debugger. Have you tried building/installing a package and see if that also show the similar lag?

    - Ashish [MSFT]


    Ashish Sahu [MSFT]

    Tuesday, January 15, 2013 8:57 PM
  • Hi Ashish,

    I have created a package and deployed it and tested it (Release test build). It is slow on surface.

    - Girija

    Tuesday, January 15, 2013 9:31 PM
  • Can you please share a sample project that shows this problem?

    - Ashish [MSFT]


    Ashish Sahu [MSFT]

    Tuesday, January 15, 2013 9:32 PM
  • Hi Asish,

    You can create a sample app with a page with title (<h1>) and have a flip view. The title should not be part of the flip view but it should be the page title. On changing the flip view try and update the title. You can easily reproduce this.

    I have added some code in my mail thread. I cannot share the app as it is internal.

    - Girija

    Tuesday, January 15, 2013 11:56 PM
  • Hi,

    I was able to build a sample project and analyze this behavior myself. I believe the root of the problem is that the pageselected event fires when the flipview control has settled on a single item so there is a visible delay in your case.

    Have you thought of updating the title in the event handler of the the pagevisibilitychanged event? This event fires before the pageselected event so you may be able to get an acceptable behavior?

    - Ashish [MSFT]


    Ashish Sahu [MSFT]

    Friday, January 18, 2013 6:44 PM
  • Hi Ashish,

    Thanks for the reply. I tried the pagevisibilityevent, it is ok for desktops or laptops where mouse is used for events, but if it is on a device where we use touch (like surface) the user experience is not that good.

    - Girija

    Saturday, January 19, 2013 6:26 AM
  • Hi Girija,

    Sorry about the delayed reply but it seems there's nothing much that can be done about this issue right now.

    However, the right people are aware about this issue now.

    - Ashish [MSFT]


    Ashish Sahu [MSFT]

    Thursday, January 31, 2013 8:37 PM