Why does WPF toggle button pulse once unchecked

Posted by randyc on Stack Overflow See other posts from Stack Overflow or by randyc
Published on 2010-06-15T18:53:40Z Indexed on 2010/06/15 19:42 UTC
Read the original article Hit count: 552

Filed under:
|
|

Wihtin a Desktop app I have a toggle button:

For the Checked event I am setting a value and then executing a method FilterView(); //ommitting code

Unchecked state is just the opposite. resets a variable and executed the method again

The question I have is I noticed when I uncheck the toggle button the button continues to pulse or flash ( going from blue to chrome) as if it still has focus. The button will stay like this until another button is clicked.

Is there a way to remove this focus so that when the button is unchecked the button goes back to a unchecked state without the flashing / pulsing color.

  • As you can see from above this is a standard toggle button no styles or custom
  • I tested this on just a regular button and I found the same occured when clicked the button will continue to pulse / flash until another button is clicked.

How do you work around this or prevent this effect from happening.

Thank you

© Stack Overflow or respective owner

Related posts about wpf

Related posts about wpf-controls