RSS

Tag Archives: scroll issue

WP7 ListBox does not scroll

If you have the problem that your ListBox, created in XAML, does not have the ability to scoll (even though you have put it into scope of a ScollViewer) you may have the case that you put your ListBox into a StackPanel. There it would not scroll.

You may have following 2 cases:

<StackPanel>
    <Label Content="MyList"/>
    <ListBox ItemsSource="{Binding MySuperDuperList}"/>
</StackPanel>
<StackPanel>
    <Label Content="MyList"/>
    <ScrollViewer>
        <ListBox ItemsSource="{Binding MySuperDuperList}"/>
    </ScrollViewer>
</StackPanel>

To solve the problem put the ListBox into scope of a Grid, then it will scoll again.

<StackPanel>
    <Label Content="MyList"/>
    <Grid>
        <ListBox ItemsSource="{Binding MySuperDuperList}"/>
    </Grid>
</StackPanel>
Advertisements
 
1 Comment

Posted by on May 22, 2011 in WP7

 

Tags: , ,