WPF Popup: How to put a border around the popup?

通过设置 Border 的 margin 来为阴影留出位置,并设置 Popup: AllowsTransparency="True"。

 <Popup ... AllowsTransparency="True">
<Grid >
<Border ... Margin="0,0,8,8">
<Border.Effect>
<DropShadowEffect />
</Border.Effect>
...Content...
</Border>
</Grid>
</Popup>

Popup 显示阴影-LMLPHP

05-11 15:46