ScrollViewer jumps around on high zoom levels RRS feed

  • Question

  • Hi all,

    I've been experimenting with a ScrollViewer that can zoom in really far. I found that once you get to a fairly high zoom level, it stops working correctly. When you use ctrl + mouse wheel to zoom, it will sort of jump around a bit when you're finished before it settles. It's really straight forward to reproduce (at least on my machine)

    I just create a new Blank App with VS 2013, then on MainPage.xaml, I add the following inside the grid so that it looks as follows:

        <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <ScrollViewer Margin="20" MaxZoomFactor="500" MinZoomFactor="0.1">
                <Canvas Width="5000" Height="5000">
                        <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
                            <GradientStop Offset="0" Color="Red"/>
                            <GradientStop Offset="1" Color="Yellow"/>
                    <TextBlock Text="Top Left"/>

    Now, if you try to zoom in on the TextBlock saying Top Left, you will notice that after a ctrl + mouse wheel zoom, it will jump around a bit.

    Best Regards,

    Tomas Hofmann

    Tuesday, October 1, 2013 7:05 PM

All replies

  • I can reproduce the problem you have mentioned, but did you try setting the VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" properties on the ScrollViewer and see if it fits your scenario? Using these attributes, there is a slight jump that I notice at very high zoom levels (the word Top fills up my screen), but it is less significant than without the attributes.

    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    Wednesday, October 2, 2013 1:14 AM
  • Hi Prashant,

    Thanks for the reply. I edited the settings and it is indeed better this way. However, it's still pretty jumpy.

    Do you know if this is something that might be fixed at some point in the near future?



    Friday, October 4, 2013 12:12 AM
  • I decided to investigate at which zoom level the text started hopping. As I did, I noticed that it was the text that was jumping, as opposed to the actual content of the ScrollViewer. I put a Rectangle in there, and it didn't jump at all.

    In my case, I don't really have to display text inside the ScrollViewer, so if I decide to go with this high zoom factor ScrollViewer, then I think that it will be alright.


    Friday, October 4, 2013 12:19 AM