have a simplified XAML code snippet that involves nested ScrollViewer controls within a Grid and a ContentControl. The scenario is as follows:
<ScrollViewer x:Name="ParentScrollViewer">
<Grid x:Name="SiblingGrid">
<!-- Content within the sibling grid -->
</Grid>
<ContentControl>
<ScrollViewer x:Name="ChildScrollViewer">
<!-- Content within the child ScrollViewer -->
</ScrollViewer>
</ContentControl>
</ScrollViewer>
In this layout, the ChildScrollViewer is fully expanded and, therefore, its vertical scroll bar is hidden. However, when the mouse is hovered over it, it becomes unable to scroll, similar to the behavior when hovering over the SiblingGrid. While this is the desired behavior for one view, it still needs to function as a ScrollViewer for other views since it resides within a ContentControl.
The challenge arises when attempting to achieve the following
- When the mouse hovers over SiblingGrid, scrolling should occur normally.
- When the mouse hovers over ChildScrollViewer, scrolling should propagate to the parent ScrollViewer if the content is fully expanded. However, the ChildScrollViewer should still maintain its own scrolling behavior when its scroll bar is visible.
My goal is to implement a solution that satisfies these requirements. How can I achieve the desired scrolling behavior for both views based on the mouse hover context?