【发布时间】:2018-05-31 15:20:58
【问题描述】:
我希望网格在屏幕上伸展,同时应用阴影效果,由于某种原因,当放置在 DropShadowPanel 内时,我无法伸展网格。
这是一个期望结果的示例,但没有阴影效果:
<Grid Background="LightBlue">
<Grid Background="WhiteSmoke" HorizontalAlignment="Stretch" Height="200" VerticalAlignment="Top" Margin="40"/>
</Grid>
结果:
这是我的带有 DropShadowPanel 的 xaml:
<Grid Background="LightBlue">
<controls:DropShadowPanel HorizontalAlignment="Stretch" Margin="40">
<Grid Background="WhiteSmoke" HorizontalAlignment="Stretch" Height="200" VerticalAlignment="Top"/>
</controls:DropShadowPanel>
</Grid>
这完全隐藏了第二个网格。
为什么网格在 DropShadowPanel 中的行为不同?
【问题讨论】:
标签: xaml uwp uwp-xaml windows-community-toolkit