我有一个带有背景颜色的Grid
。 ScrollViewer
是Grid
的第一个子元素。 ScrollViewer
的背景与父元素相同。
问题: 不需要ScrollViewer
的背景,有没有什么方法可以去掉它?
代码:
<Grid x:Name="ContentPanel" Background="Bisque">
<ScrollViewer Height="500" Width="300" BorderBrush="Red" BorderThickness="1">
</ScrollViewer>
</Grid>
我尝试将ScrollViewer的
Background=Transparent
设置为透明,但没有起作用。