wpf - Forwarding keyEvents from one window to another -


i'd bring keydown events popup window-object hosting window-object.

the popup able reference hosting window-object.

to pass events 1 uielement another, can use raiseevent method. there number of ways this, 1 simple. if want learn more concept, take @ this overview on routed events.

in popup window:

protected override void onkeydown(keyeventargs e) {   base.onkeydown(e);    var window = // reference hosting window    window.raiseevent(e); } 

in hosting window body:

protected override void onkeydown(keyeventargs e) {   base.onkeydown(e);    // use key event } 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -