I have UserFontrol WPF with Focusable = "True". This is the only custom control in the window.
Whenever the user presses Tab or Alt (and especially when they Alt + Tab to another application), my UserControl gets the border with the dashed line, as well as the focus rectangle. Then the focus rectangle remains there until the window is closed.
How can I prevent my UserControl from showing this focus rectangle?
Edit
Turns out the focus rectangle wasn't actually displayed by my UserControl. My Focusable UserControl contained another UserControl, which in turn contained an ItemsControl, and ItemsControl is what the focus rectangle showed.
When I added FocusVisualStyle = "{x: Null}" to the ItemsControl, the focus rectangle is gone.
wpf focus
Joe White May 04 '09 at 2:05 a.m. 2009-05-04 02:05
source share