views:

90

answers:

0

I have a WinForms ComboBox control at the top of my form. Different ElementHost controls are shown based on what is displayed in the ComboBox.

The problem occurs when I try to tab into the first WPF CheckBox on the ElementHost. The CheckBox gets focus but does not have any focus retangle because WPF doesn't know that the keyboard was the cause of the focus change.

Here are some of my ideas:

  1. Overide the CheckBox's template. Rather than rely on the FocusVisualStyle adorner, setup an adorner that is always displayed when the control has keyboard focus, regardless of whether that last input device was Keyboard, Mouse, etc.
  2. Find some way to trick WPF into thinking that the Keyboard caused the focus change (because it actually did) when the checkbox gets focus. The the default render scheme would work.

Ideas? Thoughts? Comments?