wpf border的阴影效果

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a771948524/article/details/9345045
<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Border SnapsToDevicePixels="True" CornerRadius="5"
        BorderBrush="#d24726" BorderThickness="10" Margin="20"
        HorizontalAlignment="Center" VerticalAlignment="Center">
            <Border.Effect>
                <DropShadowEffect Color="#d24726" BlurRadius="16" ShadowDepth="0" Opacity="1" />
            </Border.Effect>
            <Image Width="200" Source="d:/1.jpg" Stretch="Uniform" />
        </Border>

    </Grid>
</Window>


效果:

没有更多推荐了,返回首页