locked
SemanticZoom ZoomedinView scrolling to wrong position by itself. RRS feed

  • Question

  • Hi,

    i´m working on a view containing a SemanticZoom and i´m seeing a strange behaviour when switching between ZoomedOut and ZoomedInView. To illustrate the issue I created a Little sample app, A little modification of the Default GridApp.

    http://sdrv.ms/1hzMT1l

    The issue I´m seeing is that the ZoomedInView is scrolling to correct position when switching from ZoomedOutView and than gets animated by itself to a wrong Position.

    To reproduce it, start the app. go into ZoomedOutView without scrolling the inital shown ZoomedInView on the startpage, select the last item of the ZoomedOutView and you should see the Auto scroll to the wrong Position.

    When first scrolling the ZoomedInView to the right, it looks like it is working.

    Any advice how to work arround this unwanted behaviour?


    lh

    Friday, November 1, 2013 5:25 PM

Answers

All replies

  • Hi Lars,

    Can you please confirm the repro steps and what you mean by the wrong position?

    Here's what I did:

    1) Run app

    2) On ZemanticZoom page, scrolled to the beginning (Group Title: 1)

    3) Zoom out: view has Group Title: 1 - 7 on my screen.

    4) Select group 7

    5) Zooms in to show Group Title: 6 and Group Title: 7. There is no extra scrolling. Group 7's title goes off screen: the item itself is in view.

    6) Tab to Group 7's title.

    ==> Scrolls so that the title is fully on screen. Is this the problem?

    I get similar behavior if I scroll to other groups. The GridView calls MakeVisible on the item to scroll it into view, but if it's on the right side of the screen that will let the long headers scroll off.

    --Rob

    Saturday, November 2, 2013 1:55 AM
    Moderator
  • Hi Rob,

    thanks for the reply. I´m seeing the issue when doing the following.

    1. Run the app

    2. Switch to zoomed out view

    3. Scroll to last group(14).

    4. Select group 14

    7. SemanticZoom Switches to zoomed in view and makes group 14 visible.

    8. After group 14 gets visible the GridView scrolls back to group 12 for what ever reason.


    lh

    Sunday, November 3, 2013 8:32 AM
  • I don't repro that. Group 14's item stays onscreen and does not spontaneously scroll for me. The group title itself ends up partially off-screen until I tab to it. When the title gets the focus it scrolls to be fully on screen.

    --Rob

    Tuesday, November 5, 2013 11:18 PM
    Moderator
  • Hi Rob,

    I can reproduce this on my Surface, Surface RT and Series 7 Slate. What kind of device are you testing on? Does it have touch or not?


    lh

    Wednesday, November 6, 2013 7:28 PM
  • I've been testing both with and without touch.

    I can try on a slate similar to what you are using, but it will take a few days to get that set up.

    --Rob

    Wednesday, November 6, 2013 7:46 PM
    Moderator
  • Hi Rob,

    that would be nice if you could take the time to test it. If you are interested in this, I also could show it to you during the summit.


    lh

    Wednesday, November 6, 2013 7:56 PM
  • Hi Lars,

    I also played a bit around with that. And in fact I was not able to reproduce on my Lenovo W520 without touch. I have the same results as described by Rob. But as soon as I start the app not directly on my machine, but in the Simulator, I can repro it. Also on my Surface RT I can repro the effect you've mentioned. On my Simulator and on my Surface RT it scrolls back to item 13. :-)

    It seems that it has something to do with the GroupStyle.HeaderTemplate. The TextBlock in that template gets a much larger width - due to the modified text in the SampleData.json - than the real items in that group. When I set that TextBlock to a fixed size of e.g. 100, everything works fine. So I think there's some calculation behind the scenes that doesn't take this into account correctly.


    Thomas Claudius Huber

    "If you can't make your app run faster, make it at least look & feel extremly fast"

    My latest app: The "Womanizer" :-)
    twitter: @thomasclaudiush
    homepage: www.thomasclaudiushuber.com
    author of: ultimate Windows Store Apps handbook | ultimate WPF handbook | ultimate Silverlight handbook

    Wednesday, November 6, 2013 8:10 PM
  • Hi Thomas,

    I was guessing in the same direction. Thanks for confirming this. Setting a fixed width is not an option because it´s dynamic text.... but maybe a converter calculating the width will do the trick.... not nice but could work ;-)


    lh

    Wednesday, November 6, 2013 8:19 PM
  • Setting a fixed width is not an option because it´s dynamic text

    Yes, I already thought that this is not an option. :)

    Btw, in the meanwhile, I found out that not the HeaderTemplate seems to be the important part. You can keep it as is. But that GroupPadding-Property here seems to cause the problem:

      <GridView.ItemsPanel>
                <ItemsPanelTemplate>
                  <ItemsWrapGrid GroupPadding="0,0,70,0"/>
                </ItemsPanelTemplate>
              </GridView.ItemsPanel>

    If I set it to 0,0,0,0, everything works as expected. So that could be a solution for you. And the problem seems only to occur in combination with a GroupPadding like e.g. 0,0,200,0 AND very long contents in the HeaderTemplates. :-)

    If I set the GroupPadding to 0,0,200,0, my GridView even scrolls back to item 12 after selecting item 14 in the ZoomedOutView (Before with 0,0,70,0 it was item 13). As mentioned, with 0,0,0,0 everything is fine.


    Thomas Claudius Huber

    "If you can't make your app run faster, make it at least look & feel extremly fast"

    My latest app: The "Womanizer" :-)
    twitter: @thomasclaudiush
    homepage: www.thomasclaudiushuber.com
    author of: ultimate Windows Store Apps handbook | ultimate WPF handbook | ultimate Silverlight handbook


    Wednesday, November 6, 2013 8:29 PM
  • Hmmm... Removing the padding would be a violation of the design guidelines. Adding a fixed margin to the headline is also not the working all the time because in some cases i have more items inside a group and a short headline. Deriving from ItemsWrapGrid is not possible because it´s sealed... I see trouble ahaed. But thank you very mutch for pointing me in the right direction. But I think with all that info it´s worth a connect entry. What do you think?


    lh

    Wednesday, November 6, 2013 8:48 PM
  • Hi Lars,

    yes, I think so that it's worth a connect entry.

    In addition: I tried to find out why it is not reproducable on my Lenovo W520. I don't know why, but:

    In the Simulator it is reproducable with a screen-setting of 10.6" and an arbitrary resolution. As soon as I set the screen-setting to e.g. 23" 1920x1080 (same resolution as on my W520), it's no more reproducable.


    Thomas Claudius Huber

    "If you can't make your app run faster, make it at least look & feel extremly fast"

    My latest app: The "Womanizer" :-)
    twitter: @thomasclaudiush
    homepage: www.thomasclaudiushuber.com
    author of: ultimate Windows Store Apps handbook | ultimate WPF handbook | ultimate Silverlight handbook

    • Marked as answer by Lars Heinrich Wednesday, November 6, 2013 9:16 PM
    Wednesday, November 6, 2013 9:14 PM
  • yes, I think so that it's worth a connect entry.

    Thanks for tracking this down Thomas. I'll file a bug on this, but I'm still struggling to reproduce it even on the simulator, and I'd rather not wait for the summit to see this (but definitely come and say "hi". I'll be at the All-In-One Code Framework talk & booth on Sunday).

    There is no connect for Windows issues, only for Visual Studio bugs.

    --Rob

    Wednesday, November 6, 2013 10:08 PM
    Moderator
  • Hi Rob,

    sorry for getting back on this late. After the sumit i had a bussy schedule. Like requested i made a Screen capture of it. You can download it here:

    http://sdrv.ms/18eROTT

    Maybee this could be fixed with the next release.


    lh

    Saturday, December 7, 2013 11:02 AM
  • Thanks Lars,

    I see the repro project behind that link, but not the video. I still am unable to generate the problem you demonstrated myself. I should have pulled out my camera when you showed me!

    --Rob

    Thursday, December 12, 2013 1:43 AM
    Moderator
  • Hi Rob,

    that´s strange.. You do not have access to the SemanticZoom_GhostScroll.zip under http://sdrv.ms/18eROTT? Inside the zip there is the screen capture avi.Is there any other way to share the file with you


    lh

    Tuesday, December 17, 2013 6:52 PM
  • I can see it now, thanks! I must have been looking at a different file since I got the sample source rather than the AVI.

    --Rob

    Tuesday, December 17, 2013 6:57 PM
    Moderator