I have two entirely uncoupled WPF windows, however, if something particular is happening in window 1, I do want to invoke or 'simulate' a Key.Up/.Down on a control on the 2nd window. Is that possible?
A:
Are they sharing an application? If they do, you should be able to call BeginInvoke
on the control's event handler
But why to simulate a key press when you can just call a function?
synhershko
2010-08-24 22:20:26
The windows are within the same application. Basically the usecase is that in certain scenarios the KeyUp/KeyDown events shall be 'forwarded' to a control on the second window and not be performed on the main one... and not call a method per se.
Jörg B.
2010-08-25 08:39:35
Then in these scenarios just call the event handler for the other control with the same params; or better yet - have them both use the same event handler, in which you'll decide what to do based on your scenario
synhershko
2010-08-25 11:21:22