<Border Background="White" Width="150" Height="350"> <Border.Effect> <DropShadowEffect ShadowDepth="0" Color="#c0c0c0" BlurRadius="10"/> </Border.Effect> <StackPanel> <Button Height="50" Content="这个测试"/> <Button Height="50" Content="这个测试"/> </StackPanel> </Border>
实现的效果:
Border 外层添加上Popup标签,阴影效果就没了,求大牛们帮忙。
<Popup> <Border Background="White" Width="150" Height="350"> <Border.Effect> <DropShadowEffect ShadowDepth="0" Color="#c0c0c0" BlurRadius="10"/> </Border.Effect> <StackPanel> <Button Height="50" Content="这个测试"/> <Button Height="50" Content="这个测试"/> </StackPanel> </Border> </Popup>
谢谢。
<Popup IsOpen="True" AllowsTransparency="True"> <Border Margin="10" Background="White" Width="150" Height="350"> <Border.Effect> <DropShadowEffect ShadowDepth="0" Color="#c0c0c0" BlurRadius="10"/> </Border.Effect> <StackPanel> <TextBlock Text="123" /> <TextBlock Text="456" /> </StackPanel> </Border> </Popup>