I have a MyToggleButton user control that inherits from System.Windows.Controls.Primitives.ToggleButton.
If keyboard focus is on another control, and I left-mouse click the MyToggleButton, the keyboard focus is transferred to the MyToggleButton control.
Is there a way that I can prevent the keyboard focus transfer if the MyToggleButton is left-mouse clicked?
NOTE: the user must still be able to Tab to the MyToggleButton control, which would set the keyboard focus to it. I just don't want the user to be able to set keyboard focus to it via a left-mouse click.
Again, the control needs to be clickable via a left-mouse click. I DO NOT want the control to have keyboard focus after it is clicked.
Set the
ToggleButton's Focusable property to false.