首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

WPF中 怎么清除发光效果

2012-09-25 
WPF中 如何清除发光效果?Private Sub Button1_GotFocus(ByVal sender As Object, ByVal e As System.Windo

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(好像是这个名字)

热点排行