Popup 显示阴影

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

相关文章
相关标签/搜索