S
S
Sevada242018-07-11 16:45:55
WPF
Sevada24, 2018-07-11 16:45:55

WPF: how to close an application?

There is a main window "MainWindow". In it, an instance of the "WindowAdmin" window was created

new WindowAdmin().Show();
Hide();

And the question is how to close this "WindowAdmin" window so that it not only hides, but stops debugging. In WinForms, this was solved by throwing the Application.Exit() code into the FormClosed event;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LiptonOlolo, 2018-07-11
@Sevada24

What is the problem with clicking on the window cross?
If you want the MainWindow to close after the WindowAdmin is closed, then call Close, not Hide.

spoiler
What a question - such an answer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question