WPF Popup: How to put a border around the popup?spa
經過設置 Border 的 margin 來爲陰影留出位置,並設置 Popup: AllowsTransparency="True"。code
1 <Popup ... AllowsTransparency="True"> 2 <Grid > 3 <Border ... Margin="0,0,8,8"> 4 <Border.Effect> 5 <DropShadowEffect /> 6 </Border.Effect> 7 ...Content... 8 </Border> 9 </Grid> 10 </Popup>
。blog