WPF 实现阴影效果

  • Post author:
  • Post category:其他


<Border VerticalAlignment="Top" Margin="0,200,0,0"  Height="435" Width="819" CornerRadius="5"  Background="White">
            <Border.Effect>
                <DropShadowEffect Color="Black"  BlurRadius="40" ShadowDepth="1" Opacity="0.4" />
            </Border.Effect>
            <Grid Margin="5">
                <Image></Image>
            </Grid>
        </Border>

效果:

属性:

Color–阴影颜色

BlurRadius–阴影范围

ShadowDepth–阴影偏移角度

Opacity–阴影透明度

转载于:https://www.cnblogs.com/rzm2wxm/p/10244012.html