Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable the window on the background

Tags:

c#

wpf

I have a window that opens another window. I want that when this window it's opened i can't do anything on the parent window. (I'm not allowed to click buttons for example) How I can do that?

Thanks.

like image 694
Alex Avatar asked Jun 04 '10 15:06

Alex


People also ask

Should I turn off background apps Windows?

Closing programs running in the background on your computer can free up system resources for your other programs. This can resolve problems where your system is running slowly or two programs are trying to use the same device.

Why do apps run in the background?

When you exit an app on your smartphone to return to your home screen or move on to another task, that app doesn't actually close. Instead, it continues to run in the background just in case you need to bring it up again quickly. Apps running in the background are similar to a window being minimized on your computer.


1 Answers

You need to call the ShowDialog method instead of Show to show the second window as a modal dialog.

like image 122
SLaks Avatar answered Oct 10 '22 21:10

SLaks