Boman

Hi all

1) I'am making a keyboard only application , and i would very much like the focus to stay just on the window itself

so none of the controls gets focused ... is this possible

Can any of you give and example where I can change the selected index in a listbox still with out focusing it

It would be very helpful

/Bo



Re: Windows Presentation Foundation (WPF) WPF and keyboard navigation only problem

Bragi

You could always set the focusable property of all your controls on the window to false, this way, only your window can get focus.
Why exactly do you want this Is it to make certain that the window always gets all the events In that case, you might consider using the Preview events like PreviewKeyDown, PreviewKeyUp. These are tunneling, so they start at the window. If you provide an event handler for them at the level of the window and set them to handled, non of the other controls will get the event.




Re: Windows Presentation Foundation (WPF) WPF and keyboard navigation only problem

Boman

Have tried previewkeydown but it dosent look like my window fire the event ..

Will play some more with it ..

/Bo





Re: Windows Presentation Foundation (WPF) WPF and keyboard navigation only problem

Bragi

What exactly do you mean with 'doesn't look like my window fire the event'

Do you mean that, the event handler you attached to the PreviewKeyDown event of the window ,isn't called