0

I was wondering if there is a window property, for a wpf application, that disables any actions outside of the window. For example, when you open a message dialog and click outside of it, the message dialog background flashes. Kind of saying you can't do any actions outside of the message dialog untill you click the 'OK' button. I want that implemented in some windows that I open in a program i'm developing but can't seem to find any info on it. Looking for ways on how i might approach this.

Rowin ten Hoope
  • 73
  • 1
  • 11

1 Answers1

0

Try ShowDialog() instead of Show()

Opens a window and returns only when the newly opened window is closed.

Window childWindow = new Window();
childWindow.ShowDialog();

Note that it will prevent clicks only on parent window(s). Clicks on other applications or Desktop can't be prevented by the Dialog.

aepot
  • 4,558
  • 2
  • 12
  • 24