I have a wpf application with a window, say first window has a list view which shows some items and when any list view item is selected and user press left navigation keyboard button , application needs to launch new window and list view should selects next item.
To realize above requirement list view's previewkeydown event handler is being used to launch new window and change selection to next item.But the problem is once new window is open, new window will get focus and if user press left navigation keyboard button, list view's previewkeydown event handler does not get called. so to make left navigation key press work, once newly window is loaded, focus is being set on first window by using "window.Focus()" api. but this solution does not work always.
Is there a way to listen to keyboard key pressed event when window is not focused?
