WPF中 如何清除发光效果?
Private Sub Button1_GotFocus(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.GotFocus
Dim aE As New Effects.OuterGlowBitmapEffect
Dim myGlowColor As Color
myGlowColor.ScA = 1
myGlowColor.ScB = 0
myGlowColor.ScG = 1
myGlowColor.ScR = 1
aE.GlowColor = myGlowColor
aE.GlowSize = 30
aE.Opacity = 0.7
Button1.BitmapEffect = aE
End Sub
Private Sub Button1_LostFocus(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.LostFocus
在这写什么能清除发光效果?
End Sub
[解决办法]
Button1.BitmapEffect = Nothing
不过这样使用很耗资源的,不如用Style提供的Tigger(好像是这个名字)