Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WPF移除阴影效果_Wpf_Vb.net_Effect_Dropshadow - Fatal编程技术网

WPF移除阴影效果

WPF移除阴影效果,wpf,vb.net,effect,dropshadow,Wpf,Vb.net,Effect,Dropshadow,现在,如果单击按钮A,按钮B将显示DropShadow效果: Private Sub ButtonA_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles ButtonA.Click Dim objDropShadow As New DropShadowEffect objDropShadow.ShadowDepth = 0

现在,如果单击按钮A,按钮B将显示DropShadow效果:

 Private Sub ButtonA_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles ButtonA.Click

 Dim objDropShadow As New DropShadowEffect
            objDropShadow.ShadowDepth = 0
            objDropShadow.BlurRadius = 30
            objDropShadow.Color = Colors.GreenYellow

            Me.ButtonB.Effect = objDropShadow

End Sub
如果单击按钮C,我将如何从按钮B中删除DropShadow效果

试试看

Private Sub ButtonC_Click(
  ByVal sender As System.Object, 
  ByVal e As System.Windows.RoutedEventArgs) Handles ButtonC.Click

 Dim objDropShadow As New DropShadowEffect
            objDropShadow.ShadowDepth = 0
            objDropShadow.BlurRadius = 0
            objDropShadow.Color = Colors.Transparent

            Me.ButtonB.Effect = objDropShadow

End Sub
Me.ButtonB.Effect = Nothing        // VB.Net
this.ButtonB.Effect = null;        // C#