0

In this XAML I can scroll Contents grid up and down a bit even though it does not exceed the ScrollViewer height.

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="80" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>

    <Grid x:Name="Controller" Grid.Row="0">
        <controls:SearchField x:Name="Searcher" />
    </Grid>

    <ScrollViewer x:Name="Scroller" Grid.Row="1">
        <ScrollViewer.Content>
            <Grid x:Name="Contents">
                <TextBlock Text="HI" />
            </Grid>
        </ScrollViewer.Content>
    </ScrollViewer>
</Grid>

I guess it is a standard behavior of some kind but I don't like it too much. It it possible to make ScrollViewer not to scroll it's contents if they don't exceed ScrollViewer's height?

src091
  • 2,807
  • 7
  • 44
  • 74
  • What you're describing and showing example of is not expected behavior unless the content genuinely does require scrolling. Do you have `VerticalScrollbarVisibility="Auto"` set? – Chris W. Jan 15 '13 at 21:37
  • @ChrisW. I didn't but adding it does not help. – src091 Jan 15 '13 at 21:39
  • @ChrisW. Maybe I was not clear enough, the scollbar itself is not visible but I still can drag content up and down for some small distance and then it returns back in place. – src091 Jan 15 '13 at 21:42
  • Ah, I didn't pay attention to the wp-8 Tag, that was my mistake. I imagine it would take a little more creativity then. Let me ask though, does it move only the scrollviewer content? Or does the parent scrollviewer seem to move also? – Chris W. Jan 15 '13 at 22:16
  • @ChrisW. It only moves "Hi" text block. – src091 Jan 15 '13 at 22:24

0 Answers0