<!-- 更多按钮弹框 -->
<Popup x:Name="unfoldPopup"
PopupAnimation="Fade"
AllowsTransparency="True"
HorizontalOffset="-30" VerticalOffset="-5"
Placement="Bottom"
PlacementTarget="{Binding ElementName=unfold}"
StaysOpen="False">
<Grid Margin="20">
<Border CornerRadius="4" Background="White" Style="{StaticResource ShadowSmallOuterGlow}"/>
<ListBox Style="{StaticResource unfoldListStyle}"
ItemsSource="{Binding NaviListFold}"
SelectedIndex="{Binding NaviListFoldSelectedIndex,Mode=TwoWay}"
SelectionChanged="OnNavigateToMore"/>
</Grid>
</Popup>
grid要留margin=20的距离,这样阴影就可以在弹框里撑开了,例子中阴影样式如下:
<Style x:Key="ShadowSmallOuterGlow" TargetType="{x:Type Border}">
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect BlurRadius="20" Color="Black" Opacity="0.1" RenderingBias="Quality" ShadowDepth="0"/>
</Setter.Value>
</Setter>
</Style>