I created a window JanelaUm
, every time I click on button
this window is displayed.
no code-behind
of JanelaUm
I have event window_KeyDown
with the following code:
if (e.Key == Key.Escape)
this.Close();
However, if the user clicks 5 times on the button
to display the JanelaUm
, closing it using the esc
key will close all 5 windows, not just one.
Would anyone have an idea how to close only one? and the other 4 remain open?