Outer and Inner Glow with transparent WPF Buttons
I want my WPF Button
to get an outer glow effect when the mouse hovers over it. How can I achieve this when the Button
is transparent?
When I use a BitmapEffect
such as a DropShadow
or OuterGlow
the glow appears at the 开发者_StackOverflow中文版inside of the Button
as well because it is transparent. But I want the glow to be only at the outside.
Have you tried adding the outer glow to a border?
<Border Width="100" Height="100" Background="Transparent" BorderBrush="White" BorderThickness="1">
<Border.BitmapEffect>
<OuterGlowBitmapEffect GlowColor="Red" GlowSize="3" Opacity="1" />
</Border.BitmapEffect>
</Border>
精彩评论