views:

8

answers:

0

Hi, I have an ActiveX control inside a WinForms user control. My WinForms app loves it!

Now, moving over to WPF, I use the user control in a WindowsFormsHost control. Works great..., but I want to treat this control as a single element so the user can neatly hit TAB over the existing WPF controls AND this user control NOT to 'go inside' it. i.e. just treat it as a single control like all the others.

I think what i need is the ability to trap the keys, and in the event handler simply move focus to the next control in the sequence, but I can't seem to trap any keyboard input. Ive tried the WPF PreviewKey.. events and the like, but once the tabbing gets to the control, it seems to stay inside it and WPF events are ignored.

I couldnt find anything on this in many WPF books and the net. Can anyone suggest a way ?

Thanks, Jack.