Is there any standard way to route all Key events from the control A
to other control B
? I wish that the keyboard focus will still be on A
however the event handler of A
would trigger the all event handlers of B
for the key events.
edit: Clarification: calling a specific event handler I wrote for B
is not enough. I need to mimic the actual event. So for example I want that if a key is sent to a TextBox
, it would be written to the TextBox
. The solution given below does not do that (not to mention the fact that if new event handlers are added to B
it completely fails).
I'm aware that WPF differentiates between logical focus and keyboard focus, but I need both focuses to remain on control A
, but in a certain cases route its incoming event to other controls.