I have DataGrid
and other elements contained within the ScrollViewer
and want to find out how it is possible to delegate DataGrid
scrolling on the outer ScrollViewer
. I mean if the mouse pointer is not on the DataGrid
- scrolling is executed on the containing ScrollViewer
, but once the mouse pointer is on the DataGrid
- it will scroll instead of "main" ScrollViewer
.
Here is the code snippet:
<ScrollViewer>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Content1/>
<DataGrid Grid.Row="1"/>
<Content2 Grid.Row="2"/>
</Grid>
</ScrollViewer>
Is there any way to merge scrolling between the outer ScrollViewer
and contained DataGrid
?