Scrolling on an ItemsControl
itemscontrol, scrollviewer, windows-phone-8.1, xaml
Solution
Just put the ScrollViewer around the ItemsControl, not inside it. Something like this:
<Pivot TabNavigation="Once">
<PivotItem Header="unread">
<ScrollViewer>
<ItemsControl ItemsSource="{Binding Categories}">
//Some ItemsControl properties and stuff
</ItemsControl>
</ScrollViewer>
</PivotItem>
</Pivot>
Solved
For everyone reading this - the problem was that the Pivot was in a StackPanel. And ScrollViewers do not work inside of StackPanels, because these panels have unlimited height (or width, depending on the Orientation), and then there's nothing to scroll as everything fits. You could use a StackPanel inside a ScrollViewer, though.
Problem
I have created info inside a PivotItem but for some reason the items do not scroll, I've tried scrolling but it creates a sort of compressed effect and not scrolling down. I have tried wrapping it with a `ScrollViewer` and also tried ``` <ItemsControl.Template> <ControlTemplate> <ScrollViewer VerticalScrollBarVisibility="Visible" VerticalScrollMode="Enabled"> <ItemsPresenter /> </ScrollViewer> </ControlTemplate> </ItemsControl.Template> ``` With no luck - can anyone identify what could be wrong? ``` <PivotItem Header="unread"> <ItemsControl ItemsSource="{Binding Categories}" > <ItemsControl.Template> <ControlTemplate> <ScrollViewer VerticalScrollBarVisibility="Visible" VerticalScrollMode="Enabled" BringIntoViewOnFocusChange="True"> <ItemsPresenter /> </ScrollViewer> </ControlTemplate> </ItemsControl.Template> <ItemsControl.ItemTemplate> <DataTemplate> // --- </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </PivotItem> ```