1

I have a WPF parent window that opens a modal dialog with the ShowDialog method when a button is clicked on the view. The parent window is blocked as expected until interaction with the pop-up ends, but the minimize, maximize and close buttons on the parent view are still available and clickable. Do you know if it is possible to disable them and if yes, how?

I also noticed that if my parent window is WinForms it works like this, only for WPF remain these 3 buttons clickable.

Note: the default behavior in WPF already provides this. Our library code was overwriting it. Issue has been solved since.

kemenesendre
  • 165
  • 1
  • 1
  • 11
  • Possible duplicate of [Windows Forms: How to hide Close (x) button?](https://stackoverflow.com/questions/7301825/windows-forms-how-to-hide-close-x-button) – Stefan Nov 05 '19 at 14:10
  • 3
    My parent is WPF and this is an answer for WinForms. It doesn't help me. – kemenesendre Nov 05 '19 at 14:13
  • 1
    Hi, did you try to set the ``Owner`` of the dialog window to the main window? In my case, setting the owner prevents the 3 buttons of the parent window from getting clicked. – Sasino Nov 05 '19 at 14:44
  • I did not, but sounds like a good idea. I will try and come back when I have an answer! – kemenesendre Nov 05 '19 at 15:11
  • 1
    By default, the whole parent window is blocked. There must be something hacky about this window, if it works like this. Can you provide smallest example how to reproduce your issue? – Alex Butenko Nov 08 '19 at 14:47
  • This was the issue. The default behavior which is blocking the whole parent window was overwritten in our library code. Thank you Alex Butenko for the lead. – kemenesendre Nov 18 '19 at 12:35

0 Answers0