External and internal glow with transparent WPF buttons

I want my WPF to Buttonget an external glow effect when the mouse hangs over it. How can I achieve this when Buttontransparent?

When I use BitmapEffect, for example, DropShadowor OuterGlow, the glow appears inside Button, and also because it is transparent. But I want the glow to be only outside.

+3
source share
1 answer

Have you tried to add an external glow to the border?

<Border Width="100" Height="100" Background="Transparent" BorderBrush="White" BorderThickness="1">
    <Border.BitmapEffect>
        <OuterGlowBitmapEffect GlowColor="Red" GlowSize="3" Opacity="1" />
    </Border.BitmapEffect>
</Border>
0
source

Source: https://habr.com/ru/post/1727591/


All Articles