开发者

WPF DropShadowEffect on a transparent object

开发者 https://www.devze.com 2023-01-05 07:16 出处:网络
I want to be able to see a drop shadow, but not the object that is creating the drop shadow. The code below will only work if I give the ellipse a fi开发者_StackOverflow社区ll colour.

I want to be able to see a drop shadow, but not the object that is creating the drop shadow.

The code below will only work if I give the ellipse a fi开发者_StackOverflow社区ll colour.

<Ellipse Width="640" Height="640">
    <Ellipse.Effect>
        <DropShadowEffect Color="Cyan" BlurRadius="60"  />
    </Ellipse.Effect>
</Ellipse>

This makes sence as an invisible object wouldn't have a shadow. But, what if I really wanted it to? Is there a way to make this happen?


Are you looking for this? Or are you expecting the entire shadow to appear? If later, did you try making the ellipse transparent by setting the alpha value to zero?

0

精彩评论

暂无评论...
验证码 换一张
取 消