0

Page scrolls without any issue when the mouse is over data grid. If the mouse outside datagrid page doesn't scroll.

<navigation:Page>
<Grid x:Name="LayoutRoot" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
     <ScrollViewer x:Name="scrollMainQueue" VerticalScrollBarVisibility="Auto" >
        <StackPanel>
            <StackPanel>
            </StackPanel>
            .......
            <StackPanel>
                <data:DataGrid AutoGenerateColumns="False" Name="grdWorkingDocs" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinHeight="50" Margin="5,0,5,5" CanUserResizeColumns="False" CanUserReorderColumns="False" LoadingRow="grdWorkingDocs_LoadingRow" AlternatingRowBackground="White" RowBackground="White" HorizontalGridLinesBrush="White" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" />
            </StackPanel>
            </StackPanel>
            ......              
        </StackPanel>
    </ScrollViewer>
</Grid>

scrollMainQueue.SetIsMouseWheelScrollingEnabled(true);


After some research Got the answer. Basically we need to set the background color to the scrollviewer. It worked after that.

<ScrollViewer x:Name="scrollMainQueue" VerticalScrollBarVisibility="Auto" Background="White">
Praveena M
  • 522
  • 4
  • 10

3 Answers3

0

Answer is as mentione above. Applied background color to scrollviewer made is scrollable.

Praveena M
  • 522
  • 4
  • 10
0

Background="Transparent" also works, if you can't use any color because of your design requirements.

0

I was using the Content Control to hold the inner view wrapped up with scroll viewer, the scroll viewer was only working on mouse wheel when the pointer is on any field and not on the empty area.

After seeing the above posts, I set the background color and it started working fine, though the solution looks unrelated [don't know how exactly related to the problem].

Kiran
  • 1